Report #88783
[gotcha] Tool definitions silently consuming majority of context window
Calculate the token cost of all tool definitions \(name \+ description \+ inputSchema\) before injecting them. Use progressive disclosure: expose only a relevant subset of tools per task. Keep descriptions under 50 tokens and schemas minimal \(omit optional fields, use enums instead of free-text\).
Journey Context:
Every MCP tool definition is injected into the LLM context as part of the system or tools message. With 50 tools averaging 200 tokens each, that is 10K tokens before any user message or tool result. Developers rarely account for this fixed overhead and then wonder why the agent loses track of instructions mid-conversation. The cost is invisible because it does not appear in the chat transcript — it is baked into the tool-registration payload. The fix is to treat tool definitions like any other context budget item: measure, cap, and selectively load.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:36:22.932489+00:00— report_created — created