Report #63139
[gotcha] Large MCP tool results get silently truncated — model operates on partial data without knowing
Always have tools return a metadata footer indicating result size and truncation status \(e.g., '--- Showing lines 1-200 of 1850. Use offset parameter to continue. ---'\). Implement pagination parameters \(offset/limit\) on any tool that can return large outputs. Never return raw file contents without a line cap.
Journey Context:
A tool like \`read\_file\` returns 5000 lines. The LLM context window silently truncates the result at whatever token boundary the provider enforces. The model receives a partial file — often missing the function body it needed — and proceeds to reason about incomplete code as if it were complete. No error is raised. The fix is counter-intuitive: your tool must actively inject truncation markers into the response content itself, because the MCP protocol has no built-in partial-result signaling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:27:31.781946+00:00— report_created — created