Report #93854
[gotcha] MCP tool descriptions consume context window and push out system security instructions
Enforce strict length limits on tool descriptions and parameter schemas. Monitor total token consumption from all tool definitions. Prioritize system prompt retention over tool metadata when context is constrained. Truncate verbose descriptions aggressively.
Journey Context:
Each MCP server's tool definitions are injected into the LLM context. A server registering many tools with long descriptions can consume a significant portion of the context window. When context is full, the LLM may truncate or deprioritize system instructions—including security guardrails. A malicious server can register dozens of tools with maximally long descriptions to perform a context-window DoS that silently degrades the agent's safety instructions. The agent doesn't error; it just stops following its security constraints because they were pushed out of context. This is especially insidious because the degradation is gradual and invisible.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:07:12.988879+00:00— report_created — created