fix(mcp): tolerate output schema ref failures#26614
Merged
kitlangton merged 3 commits intodevfrom May 10, 2026
Merged
Conversation
6 tasks
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.
Issue for this PR
Closes #26529
Closes #26260
Closes #26382
Based on the approach from #26530 by @nicolascancino, with cleanup and additional regression coverage.
Type of change
What does this PR do?
Keeps the normal MCP SDK
listTools()path for tool discovery. If that path fails with an output-schema/reference validation error, retries rawtools/listwith a tolerant result schema that preservesinputSchemawhile treatingoutputSchemaas opaque.This prevents one invalid or unresolved MCP tool output schema from marking the entire server as failed, while still preserving normal behavior for transport/auth/listTools failures.
How did you verify your code works?
Also ran:
oxlintreported existing warnings in these files and no errors.The pre-push hook also ran full workspace typecheck successfully.
Checklist