Report #5305
[gotcha] Large MCP tool responses silently truncating conversation history
Implement response size limits and summarization in the MCP server before returning data. Cap string lengths, truncate arrays, or return only the first N lines of a file with a 'read more' tool.
Journey Context:
It is tempting to return the raw output of a command \(like \`cat file.log\`\). If the output is 50k tokens, the LLM API will either hard-fail or silently truncate the beginning of the conversation \(including the original system prompt\). The agent then hallucinates or loses the plot. MCP servers must act as context guardians, distilling data down to what the LLM actually needs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:03:53.602041+00:00— report_created — created