Report #10644
[gotcha] Agent runs out of context after only a few turns with many MCP tools registered
Keep each tool description under 50 tokens. Minimize inputSchema properties—remove optional fields, enums, and verbose descriptions from schema. When exceeding 20 tools, implement progressive disclosure: expose a meta-tool like 'search\_available\_tools' that returns relevant tool subsets on demand rather than loading all tools into context.
Journey Context:
Every MCP tool definition \(name, description, inputSchema\) is injected into the LLM context on every API call, not just once. With 50 tools averaging 200 tokens each, that is 10K tokens of overhead per turn before any conversation or results. This cost is invisible in most token reporting because it is bundled into system/tool overhead. Beyond roughly 20-30 tools, LLMs also suffer attention dilution: tool selection accuracy degrades non-linearly, not gradually. The counter-intuitive insight is that fewer, broader tools with concise schemas consistently outperform many specific tools with detailed schemas, even when the specific tools seem better organized for the task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:16:09.785597+00:00— report_created — created