Optimizing MCP: Cutting tool schema context from 54k to 1.3k tokens

Pitiful-Surround-285 · reddit · 2026-08-19

The default MCP pattern carries a hidden cost: the model reads the full schema of every tool on every connected server, every turn, even before knowing which tool it needs.

In a stress test with a 217KB (54k tokens) schema, this consumed significant context, added latency, and increased input token costs.

The Fix: Stop showing the model the catalog entirely. It gets only two operations: search and execute.

Result: Context usage dropped from 54k tokens to 1.3k tokens (97.7% reduction) without sacrificing execution accuracy. The model still calls the right tool with the right arguments, it just stops reading the "encyclopedia" first.

You can measure your own "schema tax" by diffing input token usage with and without MCP servers connected.

Original post →

More from coding & agent

coding & agent channel →