Report #77287
[gotcha] Agent runs out of context with barely any conversation history
Audit total token cost of all tool definitions returned by tools/list; keep active tool count under 20; trim descriptions to 1-2 sentences; implement tool filtering or on-demand loading so only relevant tools occupy context.
Journey Context:
Every MCP tool's name, description, and inputSchema JSON is injected into the LLM context before any user message. A single tool with a verbose description and complex schema can cost 300-500 tokens. At 50 tools, you burn 10-20K tokens on definitions alone—silently eating the context window. The agent appears forgetful or truncated, but the real culprit is tool-definition bloat. Developers assume more tools = more capability, but past ~20 tools the marginal accuracy gain is negative because both context shrinkage and attention dilution compound.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:19:21.563929+00:00— report_created — created