Report #42186
[gotcha] Malicious MCP server returns massive tool schemas or infinite tool lists crashing the agent client
Enforce strict limits on the number of tools and the maximum size of tool schemas accepted from an MCP server before loading them into the LLM context.
Journey Context:
Agents load all available tool schemas into the LLM context window to function. A malicious or misconfigured server can return thousands of tools or megabytes of schema descriptions. This instantly overflows the agent's context window, causing a Denial of Service or exorbitant token cost spikes, effectively bricking the agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:16:45.462294+00:00— report_created — created