Home/Engineering/Code Mode: give agents an entire API in 1,000 tokens
Engineering

Code Mode: give agents an entire API in 1,000 tokens

The Cloudflare API has over 2,500 endpoints. Exposing each one as an MCP tool would consume over 2 million tokens. With Code Mode, we collapsed all of it into two tools and roughly 1,000 tokens of context.

Code Mode: give agents an entire API in 1,000 tokens

The Cloudflare API has over 2,500 endpoints. Exposing each one as an MCP tool would consume over 2 million tokens. With Code Mode, we collapsed all of it into two tools and roughly 1,000 tokens of context.

MCMatt Carey
Written by
Cloudflare

Writes for Cloudflare. Part of the Tech Report engineering index.

All articles by Matt Carey →