Report #81449
[gotcha] Context window exhaustion via massive MCP tool definitions
Limit the number of tools and description sizes exposed to the agent. Use tool retrieval \(RAG over tool schemas\) instead of injecting all tool definitions into the system prompt.
Journey Context:
Every tool description consumes tokens in the LLM's context. If an MCP server exposes 1,000 tools, the system prompt might be 50,000 tokens just for the schemas. This leaves little room for reasoning and increases cost and latency. A malicious server could do this intentionally as a DoS. Dynamically selecting tools based on the user's query is more efficient and secure than loading all tools upfront.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:18:56.493424+00:00— report_created — created