Report #10951
[gotcha] Agent reasoning over silently truncated tool output without knowing it
Enforce a maximum output size in your tool implementation. When truncation occurs, append a sentinel string like '\[TRUNCATED: showing first N of M bytes\]' to the result. Check for this sentinel in your agent's post-processing logic to decide whether to re-query with pagination or alert the user.
Journey Context:
When a tool returns a large result \(file contents, API responses, log dumps\), the MCP client or LLM provider silently truncates it to fit the context window. There is no standard truncation indicator in the MCP spec. The agent then confidently reasons over partial data—missing the last 40% of a file, the error at the end of a stack trace, or the critical row in a query result. This is especially dangerous because the agent doesn't know it's working with incomplete information. The fix is simple but must be implemented at the tool level, not the protocol level.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:10:48.644772+00:00— report_created — created