Common Questions

MCP Tool Output Truncated: Find Where Records Disappear

Trace incomplete MCP results across the source, tool response, client and model. Distinguish discovery pagination from paging a tool's returned data.

·4 min read

The essentials

  • Compare the source, server response, client result and model answer before changing output limits.
  • Tool discovery pagination does not automatically paginate a tool's data; follow that tool's documented continuation contract.
On this page

When MCP tool output is truncated, locate the missing data before increasing a token limit. Records can be omitted by the source query, the server, the client or the model's final summary. A successful tool call does not establish that the answer contains every record.

Start with a harmless fixture whose contents you know. Do not diagnose completeness from a production dataset that changes while you inspect it.

Separate discovery pagination from result pagination

The MCP pagination specification defines cursors for listing tools, resources, resource templates and prompts. tools/list pages through tool definitions. It does not automatically page through records returned by tools/call.

A tool returning invoices or documents needs its own documented filtering or continuation interface. Inspect its input and output schemas. Do not invent a cursor argument because another server accepts one. For protocol list operations, treat cursors as opaque values; the current revision explicitly allows an empty string as a valid cursor, so truthiness alone is not an appropriate completion test.

Compare four boundaries with the same fixture

Create five fake records with stable IDs row-01 through row-05. Give the last record a distinct marker, such as LAST-FIXTURE-ROW. These are proposed test values, not measured results.

Boundary Evidence to capture Question
Source Matching record IDs and query filters Did the source select all five?
Server response Returned IDs, result count and continuation metadata Did the server return a subset intentionally?
Client's received result IDs visible in its raw diagnostic view Did content disappear after the server response?
Model answer IDs or explicit completeness statement Did the model summarize or omit received data?

Use a client diagnostic view where available. If one boundary cannot be observed, record it as unknown rather than blaming the next component. Byte counts can help locate a size limit, but transformations mean two valid representations need not have identical sizes.

Test continuation without assuming completion

If the tool supports a page size, request two records per page. Follow the returned continuation through the documented interface until the tool signals completion. Preserve the same filters and ordering. Record each returned ID, detect duplicates, and stop if a continuation value repeats without progress.

Expected fixture outcome: five unique IDs, including row-05, and an explicit end according to that tool's contract. A first response containing two IDs is a correct partial page when continuation is available; it is not evidence of truncation. Conversely, five displayed lines do not establish five unique records.

For a real dataset, insertions during retrieval can change results. Use a stable snapshot or the source's documented consistency mechanism if completeness matters. Otherwise state the retrieval interval and avoid claiming a definitive total.

Reduce output at the right layer

Finding Targeted change
Source query already omits records Fix filters or upstream pagination
Server returns an unbounded payload Add documented bounds and continuation
Client cuts a large result Request smaller slices or use its supported artifact workflow
Full result arrives but summary omits rows Ask for the needed subset or use a deterministic export/count

The tools specification supports structured results and resource links. Those are useful design options, not guarantees that every host will fetch a linked resource. Verify client support and preserve authorization when providing any downloadable artifact. Avoid embedding a whole private dataset merely to answer a count question.

Finish with a completeness check

Repeat the small fixture after the change and compare unique IDs, continuation handling and the final marker. Then try a larger synthetic fixture to exercise the actual size boundary. Record client/server versions and the observed limit; do not present one client's threshold as a universal MCP limit.

For model recall rather than missing data, use the usable-context test. If the payload is rejected instead of shortened, check tool-schema compatibility. If the agent loops through the same page, use repeated tool-call troubleshooting.

Documentation checked October 12, 2026. The fixture and acceptance procedure are illustrative; no client-specific output limit or measured retrieval result is claimed.

L

Practical guides published by Lucivo, developed with AI assistance and references to official documentation. Examples are illustrative unless a guide explicitly documents a hands-on test. Check the linked sources for current product details.

The Weekly Breakdown

High signal AI & software stories.
Direct to your inbox. No hype.

Independent analysis of AI models, developer tools, and computing architectures. Delivered every Sunday morning. 100% free.

Zero spam·One-click unsubscribe·Sunday delivery