Dumping every MCP tool schema each turn is a harness bug; tool search cuts 85% of the overhead

ainexfinder · reddit · 2026-10-15

The author argues that when agents pick wrong tools or hallucinate "I don't have X," the blame usually belongs to the harness, which stuffs every schema from every MCP server into context each turn — thousands of tokens before the user types anything, with similar tools colliding. Simply hiding tools fails too: agents dead-end because they never learned later steps existed.

The converging fix is progressive discovery: a small search tool plus deferred tool names, loading full schemas only when needed, appending discoveries to preserve prompt caches. Claude Code's MCP Tool Search ships this by default (up to 5 tools per search), and OpenAI's deferred loading is the same idea. Anthropic docs put savings above 85% of tool-definition overhead (77K tokens down to 8.7K), and selection accuracy degrades past roughly 30–50 tools.

Measuring is cheap: diff token counts with and without tool definitions. Two Claude Code gotchas: tool search silently turns off behind non-first-party proxies (they don't forward toolreference blocks), and it's hard-off under HIPAA config regardless of ENABLETOOLSEARCH — plan allowlists there. He closes by asking how others keep the MCP tool surface small without agents inventing missing tools.

Original post →

More from coding & agent

coding & agent channel →