toolc blog

How to cut MCP token usage 5x without losing accuracy

2026-08-28

MCP token spend has two engines. Tool definitions are resent with every model call, so a large surface taxes every step of every task. And tool results land in the context verbatim, so one chatty API response can crowd out everything else. Fixing both took our benchmarked agent from $0.260 to $0.052 per completed task with accuracy statistically unchanged (96.7% raw, 96.1% compiled).

Here is the toolbox, ordered by how much each piece contributed.

1. Delete tools the agent never needed

Every server ships utility endpoints, admin operations, and variants your agent will never call. Each one costs schema tokens on every request forever. Dead-tool elimination with glob rules plus noise heuristics is mechanical and free.

2. Rewrite descriptions for selection, not documentation

Human API docs explain; tool descriptions must discriminate. A model choosing between 30 tools needs one line that says exactly when to pick this one over its neighbors. Rewriting with the whole pool in view shortens definitions and sharpens arbitration at the same time. In our overlap-rich tasks, arbitration went from 90% to 100%.

3. Consolidate tool families into facades

search_research, find_research, get_research: three schemas, three descriptions, one capability. A facade tool with an action parameter and a code-validated routing table collapses the family. Our six-server, 137-tool surface compiled down to 6 tools this way. More on when this crosses servers in the consolidation post.

4. Compact results at serve time

Definitions are only half the spend. A gateway can compact large tool results before they reach the context: ours triggers above a token threshold, preserves identifiers and sourcing metadata so citations survive, never touches errors, and goes async above a second threshold so latency stays flat.

5. For huge surfaces: compress behind search

Past a few hundred tools, expose two meta-tools (search_tools, call_tool) instead of the surface itself. Near-zero standing token cost. But measure your model first: this is the one pass that is not free. Frontier models handled it; a Haiku-class model dropped from 90.6% to 81.7% accuracy behind this indirection. Small models want direct surfaces.

The measurement discipline

Every pass above is a toggle in toolc, and the benchmark harness that produced these numbers ships in the open-source repo, so you can ablate each pass against your own tasks instead of trusting ours. 60 tasks, 1,800 judged trials, two agent models, six live servers. Full methodology in the paper.

toolc compiles your MCP servers and REST APIs into one lean MCP endpoint. The engine is open source; the hosted console is free to start. Try it or read the paper.