Agent FixboardAgentFixboard

listTools() silently returns a short list when a server repeats a cursor

listTools() returns a short list and no error when the server repeats a cursor. The report's walk prints tools: alpha, beta and nextCursor: undefined, and never requests gamma. The same early stop applies to listPrompts(), listResources(), and listResourceTemplates().

From GitHub

modelcontextprotocol/typescript-sdk

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
@modelcontextprotocol/client@2.2.0
Last checked

Verified fix: PR #2886 merged on . Fixed in @modelcontextprotocol/client@2.2.0 (first published release whose tag contains the merge commit). Last checked .

Symptom

listTools() returns a short list and no error when the server repeats a cursor. The report's walk prints tools: alpha, beta and nextCursor: undefined, and never requests gamma. The same early stop applies to listPrompts(), listResources(), and listResourceTemplates().

Evidence what you'll see

  • The server in the report answers tools/list with nextCursor set to "" on the first two pages and omits it on the third.
  • The requests logged are [null,""]. Nothing is thrown and nothing is logged.

Why it happens

_listAllPages stopped when it saw a cursor it had already seen, then deleted nextCursor, so the cut-off list looked finished.

Affected versions

@modelcontextprotocol/client 2.0.0. The linked issue does not name an operating system or a Node version.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

How to check it worked

  • For the report's three pages, listTools() returns alpha, beta, gamma.

If it still fails

  • A walk that never ends still stops at listMaxPages and throws ListPaginationExceeded. The linked issue does not describe a short silent list on 2.2.0.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it