Skip to content

Leadership1 publisher2 min readPublished

Anthropic wants MCP agents to write code instead of loading every tool definition

Anthropic says the way most MCP clients hand tools to a model puts a token and latency charge on every request, and it is proposing that agents write code against MCP servers instead of calling tools one at a time.

The Board Room · Leadership desk

Illustration accompanying Anthropic wants MCP agents to write code instead of loading every tool definition

What happened

  • Anthropic says that as the number of connected tools grows, loading all tool definitions upfront and passing intermediate results through the context window slows agents down and increases costs.
  • Its engineering post says that where agents are connected to thousands of tools, they will need to process hundreds of thousands of tokens before reading a request.
  • In its Google Drive to Salesforce example, every intermediate result passes through the model and a two-hour meeting transcript flows through twice, adding some 50,000 tokens.
  • The proposal is to present MCP servers as code APIs the agent writes code against, loading only the tools it needs and processing data in the execution environment first.

Compiled by The Board RoomSomething wrong?How this is made

Why it matters

  • cost Because tool descriptions take context space and add response time, the price of an integration is paid by every request the agent serves, including those where the model calls nothing.
  • constraint The context window makes the failure binary for big payloads: past a certain document size the workflow stops rather than gets slower, so capacity planning is a question of document size as well as budget.
  • decision Cutting the token bill this way means operating a code execution environment. The choice then sits with whoever owns infrastructure.
  • precedent With MCP established as the default way to connect agents to data, the protocol's author calling its common client behaviour expensive puts pressure on client makers to support selective loading.

Most MCP clients put every tool definition into context before the model reads the user's message, and expose them to the model with direct tool-calling syntax [6]. That is a fixed charge on every request. It grows with the number of connected servers, which Anthropic says routinely runs to dozens, carrying hundreds or thousands of tools [4]. The other cost in the pattern grows with the size of the data moving through the agent, not with the tool count.

Anthropic's worked example is a two-step task in which the same document crosses the model twice. Halving the post's 50,000-token estimate gives roughly 25,000 tokens per copy of one two-hour transcript [14]. The post also says models may be more likely to make mistakes when copying large documents or complex data structures between tool calls [11].

The proposed fix has its own engineering bill. One implementation generates a TypeScript file tree from the connected servers, one file per tool, so that ./servers/google-drive/getDocument.ts is a module the agent imports and calls [13].

Anthropic wrote the protocol, and the behaviour it now calls slow and expensive is the default in most clients that implement it [6]. The fixed charge does not need a benchmark to be real, because definitions sit in the prompt whether the model calls them or not [6]. The size of the saving does need one, and the post does not include a before-and-after token measurement or the tool count at which upfront loading stops paying [16].

For a team running five servers and forty tools, this is not this quarter's decision. For a team already spread across dozens of servers, the charge is on this month's usage. A team that keeps adding servers to an agent that loads everything upfront pays for each one twice: once in tokens now, and once in the migration when the list gets long enough to hurt. MCP launched in November 2024 and the community has built thousands of servers since [2].

What to watch

  • Whether the MCP clients that load all definitions upfront ship selective or on-demand tool discovery as a default.
  • Whether Anthropic follows up with measured token counts, or a tool count at which upfront loading stops paying.
  • Whether this stays a client-side pattern or turns into a change in the protocol spec itself.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories