Report #12640
[gotcha] Agent runs out of context with barely any conversation history — tool definitions ate the window
Cap total tool definition tokens under 15K. Load tool subsets on demand by task phase. Strip verbose descriptions to 1-2 sentences. For 50\+ tools, use namespace-based progressive disclosure: expose a 'discover\_tools' meta-tool that returns the relevant subset.
Journey Context:
Every MCP tool's full JSON schema \(name, description, inputSchema\) is injected into the LLM context on every call. With 50 tools averaging 300-500 tokens each, you burn 15-25K tokens before any user message. This silently shrinks the effective context window and causes truncation of earlier conversation turns — the ones with the actual task instructions. The agent then 'forgets' what it was doing and hallucinates goals. Developers blame the model, not their tool payload.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:39:02.763631+00:00— report_created — created