Skip to main content

One post tagged with "tokens"

View All Tags

Your Agent Is Drowning in Tool Definitions (Code Execution Throws It a Rope)

· 6 min read
TheMCPGuy
MCP Developer & Educator

An overflowing context window stuffed with tool-definition JSON on the left, a slim code file on the right, tokens dropping from 150,000 to 2,000

Here is a cost nobody warns you about when you wire up your fifth MCP server: your agent gets dumber and more expensive at the same time, and it happens before the user has typed a single word.

The reason is boring and brutal. Every tool your servers expose ships a definition: a name, a description, a JSON schema for its inputs, often examples. All of it gets serialized into the model's context window on every single turn, just so the model might pick the right tool. Connect a few busy servers and you are spending six figures of tokens describing tools the model will never call for this particular request.