Report #46382
[gotcha] Agent makes decisions based on incomplete tool results — large responses truncated without any signal
Add explicit length and pagination markers to tool results \(e.g., 'Showing items 1-50 of 2,347'\). Implement pagination in your MCP tools even when the spec does not require it. Cap result sizes and include a truncated: true indicator in the result text content.
Journey Context:
MCP tool results are returned as a content array of text/image/resource blocks. There is no built-in truncation signal, pagination mechanism, or size limit in the spec. When a tool returns a large result \(e.g., listing 1000 files, dumping a large log\), the MCP client or the LLM API layer may truncate it to fit context limits — silently. The agent then reasons over partial data without knowing it is incomplete, leading to confidently wrong conclusions. This is especially dangerous for aggregation and counting tasks where the agent assumes it has the full dataset. The fix must be application-level: tools should self-paginate, include totals, and signal when results are partial. Clients should parse these markers and offer continuation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:19:41.503898+00:00— report_created — created