AgentFixboard

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

listTools(), listPrompts(), listResources() or listResourceTemplates() return fewer items than the server has, with no error.

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 stable release containing the merge commit). Last checked .

Symptom

listTools(), listPrompts(), listResources() or listResourceTemplates() return fewer items than the server has, with no error.

Evidence what you'll see

  • The server returns the same cursor for more than one page
  • The result has no nextCursor, so it looks complete
  • Nothing is logged

Cause

The page walk stopped as soon as it saw a cursor it had seen before, then deleted nextCursor, so a cut-off list looked finished.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • List tools from the same server and confirm every tool is returned.

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