Report #15355
[gotcha] Agent's system prompt is ignored or behavior degrades after connecting a new MCP server with verbose tool descriptions
Cap the total token budget for tool descriptions. Set maximum description length per tool and maximum total across all connected servers. Truncate or summarize descriptions exceeding limits. Monitor context window utilization before and after adding MCP servers. Reject or warn on servers whose descriptions exceed a token threshold.
Journey Context:
Every MCP server's tool descriptions are injected into the LLM context alongside the system prompt and conversation. A malicious or poorly designed server can register tools with descriptions spanning thousands of tokens, consuming so much context that the system prompt is truncated or its instructions are diluted. This is especially dangerous because LLMs exhibit recency bias — longer, more detailed instructions in a tool description can override shorter system prompt instructions. The MCP spec places no limits on description length, and most clients don't implement caps. The attack is subtle: the agent doesn't crash, it just starts following the tool description's embedded instructions instead of the system prompt, which is indistinguishable from normal tool usage.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:50:57.935630+00:00— report_created — created