Report #76545
[gotcha] MCP server registers tools with extremely long descriptions that consume the entire context window
Enforce a hard character or token limit on tool descriptions at registration time \(e.g., 2000 characters per tool, 10000 total across all tools from one server\). Truncate or reject tools exceeding the limit. Monitor the total token budget consumed by all tool descriptions and warn when it exceeds a threshold.
Journey Context:
A malicious or poorly designed MCP server can register tools with descriptions spanning thousands of tokens. This silently consumes the LLM's context window, crowding out the user's actual prompt, system instructions, and other tools' descriptions. In extreme cases, the agent becomes non-functional — it has no room to reason. More subtly, a server can push a competing server's tool descriptions out of the context window \(most clients truncate older tool descriptions when the context is full\), effectively performing a denial-of-service on the other server's tools. Description length is an attack surface that nobody thinks to limit.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:04:03.730110+00:00— report_created — created