Plug five popular MCP servers into an agent (GitHub, Slack, Sentry, Grafana and Splunk) and, by Anthropic’s own count, roughly 55,000 tokens of tool definitions land in the context before anyone types a word. That is 58 tools’ worth of JSON schema, re-read on every turn, whether the agent touches one of them or none.
On Claude Sonnet 5.5, at a reported $2 per million input tokens, that preamble costs about 11 cents per uncached call. A modest internal agent doing 10,000 calls a month burns roughly $1,100 describing tools it mostly ignores. This instalment of the AI on a Budget series is about cutting that bill, and about why the dollar figure is the smaller half of the problem.
How the toolbox got this heavy
MCP made connecting tools trivially easy, and the industry responded the way it responds to anything free: it connected everything. Every tool brings a name, a description and a parameter schema, and the default is to load all of them into context up front.
The GitHub MCP server is the usual worst offender. Its full surface is 93 tools and somewhere between 42,000 and 55,000 tokens depending on who measured, according to a teardown by Unblocked that collates several independent measurements. Its standard toolset of 26 tools comes in around 4,200 tokens.
Agents make it worse, because an agent loop re-sends the whole context on every turn. A task that takes 20 tool calls carries those 55,000 tokens 20 times: 1.1 million input tokens, about $2.20 on Sonnet 5.5, before the model has read a single result.
The fix providers built: tool search
Anthropic introduced its tool search tool in November 2025, and OpenAI now offers an equivalent in the Responses API. The mechanism is the same on both: you mark tools with defer_loading: true, the model sees a small search tool instead of the full catalogue, and it pulls in definitions only when it needs them.
Anthropic’s own testing put the cut at about 85%, from roughly 77,000 tool-definition tokens to 8,700. Accuracy went up as well, because a model choosing between 58 similar-sounding tools makes worse choices. On Anthropic’s MCP evaluations, Opus 4 rose from 49% to 74% and Opus 4.5 from 79.5% to 88.1% with tool search switched on.
The settings worth knowing on Claude:
- Two variants:
tool_search_tool_regex_20251119for regex patterns andtool_search_tool_bm25_20251119for natural-language queries. - Up to 10,000 deferred tools per request; each search returns 5 by default.
- At least one tool must stay non-deferred or the API returns a 400. Anthropic suggests keeping your 3 to 5 most-used tools loaded.
- Search carries no separate fee. Loaded definitions bill as ordinary input tokens.
- It works through the Message Batches API, so it stacks with the 50% batch discount covered earlier in this series.
On OpenAI, tool search needs gpt-5.4 or later, and the docs recommend grouping functions into namespaces of fewer than 10, since the models were trained mainly on namespaces and MCP servers and the savings are larger there. One trap in OpenAI’s Agents API: adding tool_search on its own defers nothing. You have to set defer_loading on each function.
Where the savings are smaller than advertised
If you already use prompt caching, your tool definitions sit in a cached prefix and cost a fraction of list price. At Sonnet 5.5’s reported cache-read rate of $0.10 per million, those 55,000 tokens cost about half a cent a call, and the $1,100 monthly figure drops to roughly $55. Tool search on top of that saves tens of dollars a month, not hundreds. Anyone selling it to you as an 85% cut to your invoice is quoting the uncached number.
It is still worth doing, for three reasons. Cache misses happen more often than people think: a five-minute TTL, an edited system prompt or a tool list changed mid-session all reset the prefix. Context is finite: 55,000 tokens is more than a quarter of a 200K window, and models get sloppier as the window fills. And the accuracy gains are savings in a different currency, because every wrong tool call costs another full round trip.
Caching cuts both ways. On Claude, a deferred tool cannot also carry a cache_control breakpoint (the API returns a 400), so put the breakpoint on a non-deferred tool. Both providers inject discovered tools at the end of the context so the cached prefix survives, but OpenAI warns that changing the loaded tool set breaks the cache from that point forward.
The cheaper moves nobody bothers with
Before reaching for any API feature, prune. The GitHub MCP server accepts GITHUB_TOOLSETS, GITHUB_TOOLS and a --read-only flag, and trimming to the standard toolset cuts schema cost by about 92%. Most servers have a similar switch. Almost nobody touches it.
Next, ask whether the task needs MCP at all. Unblocked cites one GitHub query measured at 44,026 tokens over MCP against 1,365 through the gh command-line tool, and a Scalekit comparison of $55.20 versus $3.20 a month for 10,000 operations. An agent that can run a shell is often better served by a CLI it already knows from training data. The trade-off is weaker multi-step composition, so test it on your own tasks.
Anthropic’s November 2025 write-up on having agents call MCP tools by writing code, instead of direct tool calls, cut one Google Drive to Salesforce workflow from 150,000 tokens to 2,000, a 98.7% saving. Anthropic is upfront about the bill on the other side: you need a sandbox with resource limits and monitoring, which is real engineering and a real security surface. For a weekend project, pruning wins. For a production agent shuttling large documents between systems, code execution earns its keep.
What to do this week
- Measure. Send one request with your full tool list and a one-word message, then read the input token count. That number is your toolbox tax.
- Prune every MCP server to the toolsets you actually call. Ten minutes of config, often a 50 to 90% cut.
- Switch on prompt caching if it is off. It is the biggest dollar win for the least effort.
- Past 20 or so tools (our rule of thumb, not a vendor figure), add tool search with
defer_loadingand keep your 3 to 5 hottest tools loaded. - For data-heavy workflows, run a CLI or code-execution path against the MCP one on 20 real tasks before committing.
What this means
For a small team running an internal agent on Sonnet 5.5 at 10,000 calls a month, the order of operations matters. Caching takes a $1,100 toolbox tax to about $55. Pruning cuts what is left. Tool search buys back a quarter of your context window and fewer botched tool calls. The dollar saving after caching is modest; the quality saving is where agents leak money, through retries, wrong tools and loops that run three turns longer than they should.
Did you know: Anthropic allows up to 10,000 deferred tools in a single request, which suggests somebody, somewhere, asked.
Sources
- Anthropic Engineering: Introducing advanced tool use on the Claude Developer Platform
- Claude Docs: Tool search tool
- OpenAI Docs: Tool search
- Unblocked: GitHub MCP token cost, a 2026 autopsy and 4 fixes
- Anthropic Engineering: Code execution with MCP
- Infro: Claude API pricing (November 2026)
Related on Top Tool Stack: AI on a Budget: cut your AI costs · Prompt caching