Fix tools/list default pagination for non-paginating clients#980
Merged
Conversation
Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
2 tasks
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. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #971.
tools/listnow returns all currently registered tools when a client does not provide a cursor, including theparams:{}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 mcppassed with144 passed.scripts/build.shpassed and builtbuild/c/codebase-memory-mcp.build/c/codebase-memory-mcp --ui=falsereturned 14 tools and nonextCursorfor defaulttools/list, and still returned the 6 suffix tools for explicit cursor8.make -f Makefile.cbm lint-cipassed.Caveat: full
make -f Makefile.cbm testis not green in this checkout; it reported4927 passed, 859 failed, 1 skippedfrom 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
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)