Report #17335
[gotcha] MCP tool returns massive payload that silently truncates agent context on the next turn
Enforce strict size limits on MCP tool responses. Implement server-side pagination or summarization, and truncate/summarize tool results client-side before injecting them back into the LLM context.
Journey Context:
A common pattern is returning unbounded lists \(e.g., list\_all\_files or sql\_select \*\). The MCP server happily returns 100k tokens of JSON. The client appends this to the message history. On the next API call, the context is too large, and the API either hard-errors or silently truncates the system prompt/earlier history. The LLM then loses its original instructions. Server-side limits and client-side summarization are necessary guardrails.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:10:44.092636+00:00— report_created — created