Report #13096
[gotcha] Returning huge text payloads from MCP tools causes the LLM to forget earlier conversation turns
Truncate or summarize tool results server-side before returning them over MCP. Return references \(e.g., file paths and line numbers\) instead of raw file contents, and implement pagination via cursors.
Journey Context:
A common pattern is for an MCP search tool to return 50KB of raw JSON or code. This instantly fills the LLM's context window, pushing the original user prompt and system instructions out of the active attention window. The LLM then hallucinates or loses the plot. The server must act as a context-filter, returning only the minimal signal needed, using MCP's cursor pattern for pagination if the LLM needs more data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:45:28.294915+00:00— report_created — created