TLDR · PROGRAMMING, DESIGN & DATA SCIENCE

CODE MODE: GIVE AGENTS AN ENTIRE API IN 1,000 TOKENS

blog.cloudflare.com6 min read

Summary from the TLDR newsletter

Cloudflare has introduced a new MCP for the entire Cloudflare API that uses Code Mode. The server can provide access to the entire Cloudflare API over MCP while consuming only around 1,000 tokens. Code Mode is a technique for reducing context window usage during agent tool use. It involves letting the model write code against a typed SDK and executing the code safely in a Dynamic Worker Loader instead of describing every operation as a separate tool. The code acts as a compact plan, and the model can explore tool operations, compose multiple calls, and return just the data it needs.