Repository navigation
Preserve MCP tool callback order - #7209
Open
Vamsi-2581 wants to merge 1 commit into
Open
Vamsi-2581 wants to merge 1 commit into
Vamsi-2581 wants to merge 1 commit into
Conversation
Use insertion-ordered maps while de-duplicating tool callbacks in both stateful and stateless MCP converters. Add sync and async regression tests for provider order. Fixes spring-projects#7206 Signed-off-by: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Assisted-by: OpenAI Codex
Vamsi-2581
force-pushed
the
codex/preserve-mcp-tool-order
branch
from
October 21, 2026 16:15
4310422 to
7182029
Compare
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.
Fixes #7206
What changed
Use insertion-ordered maps when de-duplicating tool callbacks in the stateful and stateless MCP converters. The existing first-match behavior for duplicate names is preserved, and provider order is retained in sync and async paths.
Tests
Added four regression cases that provide 30 ordered callbacks and assert the resulting order for stateful/stateless sync and async converters. I have not run the build locally; GitHub CI will validate the change.
AI assistance
Prepared with OpenAI Codex and reviewed by the human submitter.