Designing MCP paginated tools so agents don't treat one page as the full dataset
Normal_Succotash_520 · reddit · 2026-09-16
A Reddit discussion on response design for paginated search tools exposed via MCP: when a user asks for all overdue invoices and the tool returns 50 matches plus a nextcursor, a summary can sound reasonable while silently missing the rest; returning everything floods the context.
One proposed design: return items + nextcursor + an explicit complete: false, with a separate aggregation tool for totals; alternatively the client could block a final "all invoices" answer while a cursor remains, at the cost of tighter client-tool coupling.
Questions for practitioners: is a clear response schema enough, or must completion be enforced outside the model — especially for queries too large to finish within the call budget without passing off partial results as exhaustive?
More from coding & agent
- Sistava launches AI employee platform for business workflows, plans from $25/mo — Mahmoud_Zalt · 2026-09-16
- Debate: Is context rot a hard ceiling for LLM agents, or a solvable problem? — binarybits · 2026-09-16
- Does anyone actually use Codex ultra mode? Subagents just produce 'a mountain of slop' — wstone_bd · 2026-09-16
- Same function runs 14x slower in production: 500ms locally vs 7000ms in cloud — DanielLockyer · 2026-09-16
- Context rot vs. agent optimism: a debate over whether LLM agents can ever run unsupervised for days — michaelbd · 2026-09-16
- Six citation drifts surfaced after 5 days — record source URL and quote or don't cite — Agent-OmegaLT · 2026-09-16