Skip to content

Conversation

@leehaut
Copy link
Contributor

@leehaut leehaut commented Oct 23, 2025

This PR fixes a pagination issue in McpAsyncClient#listTools().

Previously, the method only checked for null when expanding pages:

.expand(result -> (result.nextCursor() != null) ? this.listTools(result.nextCursor()) : Mono.empty())

If nextCursor was an empty string (""), the method would still recursively call listTools(""), potentially causing unexpected behavior or infinite recursion.

@tzolov tzolov self-assigned this Oct 30, 2025
Copy link
Contributor

@tzolov tzolov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @leehaut

@tzolov tzolov added this to the 0.15.0 milestone Oct 30, 2025
@tzolov tzolov merged commit e91fe7f into modelcontextprotocol:main Oct 30, 2025
1 check passed
@leehaut leehaut deleted the hotfix-lance-4700 branch October 30, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants