Report #62293
[gotcha] Unpaginated MCP tool responses causing reasoning loops and context exhaustion
Always enforce strict size limits and pagination on MCP tool return values. Return a summary and a 'next\_page' token rather than raw data dumps.
Journey Context:
A common mistake is having a search\_files or query\_db tool return the raw result set. If the query matches 10,000 records, the tool result is massive. The LLM tries to ingest it, hits context limits, truncates, and then loops trying to process the incomplete data or makes the same query again. Returning structured summaries with pagination tokens forces the agent to reason incrementally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:02:51.687085+00:00— report_created — created