Skip to content

Fix tools/list default pagination for non-paginating clients#980

Merged
DeusData merged 2 commits into
DeusData:mainfrom
dpersek:fix/tools-list-pagination-971
Jul 9, 2026
Merged

Fix tools/list default pagination for non-paginating clients#980
DeusData merged 2 commits into
DeusData:mainfrom
dpersek:fix/tools-list-pagination-971

Conversation

@dpersek

@dpersek dpersek commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #971.

tools/list now returns all currently registered tools when a client does not provide a cursor, including the params:{} request shape used by some JSON-RPC clients. Explicit cursor requests still use the existing paged response path, so compliant paginating clients can continue to request suffix pages.

This keeps the MCP pagination machinery in place while avoiding the v0.9.0 compatibility regression where non-paginating clients only exposed the first 8 of 14 tools.

Local proof:

  • build/c/test-runner mcp passed with 144 passed.
  • scripts/build.sh passed and built build/c/codebase-memory-mcp.
  • JSON-RPC stdio probe against build/c/codebase-memory-mcp --ui=false returned 14 tools and no nextCursor for default tools/list, and still returned the 6 suffix tools for explicit cursor 8.
  • make -f Makefile.cbm lint-ci passed.

Caveat: full make -f Makefile.cbm test is not green in this checkout; it reported 4927 passed, 859 failed, 1 skipped from broad grammar/matrix probe failures plus a network-offline clone setup that do not involve the touched MCP handler path. The focused MCP suite and issue-level binary proof above pass.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects
    unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

@dpersek dpersek marked this pull request as ready for review July 9, 2026 15:31
@dpersek dpersek requested a review from DeusData as a code owner July 9, 2026 15:31
@DeusData DeusData added bug Something isn't working editor/integration Editor compatibility and CLI integration ux/behavior Display bugs, docs, adoption UX priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Jul 9, 2026
@DeusData DeusData added this to the 0.9.1-rc milestone Jul 9, 2026
@DeusData

DeusData commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Thanks. I have triaged this as the 0.9.1-rc fix candidate for #971. Review should verify both sides of the compatibility boundary: no-cursor tools/list returns the complete tool set for clients that do not paginate, while explicit cursor requests keep the existing paginated behavior.

@DeusData DeusData merged commit 4071877 into DeusData:main Jul 9, 2026
19 checks passed
@DeusData

DeusData commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Merged — thank you for the fast turnaround on a real v0.9.0 compatibility regression! Preserving the paging path for cursor-aware clients while defaulting to the full list is exactly the right compromise, and the flipped test locks the contract in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working editor/integration Editor compatibility and CLI integration priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. ux/behavior Display bugs, docs, adoption UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.9.0 tools/list pagination (page size 8) truncates non-paginating MCP clients (Cursor) to 8 of 14 tools — regression from v0.8.1

2 participants