fix(mcp): remove top-level anyOf from check_index_coverage schema - #1525
Merged
DeusData merged 1 commit intoAug 11, 2026
Merged
Conversation
check_index_coverage's inputSchema declared a top-level anyOf requiring either 'paths' or 'scopes'. Anthropic (Claude), AWS Bedrock, Google Vertex/Gemini, and Azure OpenAI all reject custom tool input schemas containing a top-level oneOf/allOf/anyOf, so any MCP client backed by one of these providers fails once this tool's schema reaches the model (e.g. Claude: 'tools.N.custom.input_schema: ... anyOf is not supported at the top level'), breaking every tool call in the session. handle_check_index_coverage already enforces 'at least one of paths or scopes' at runtime independently of the JSON Schema (path_count == 0 && scope_count == 0 rejection), so dropping the schema-level anyOf does not weaken validation. The requirement is now stated in the tool description and in the paths/scopes property descriptions instead. Fixes DeusData#1524 Signed-off-by: DaveMurray-AIGuys <264998796+DaveMurray-AIGuys@users.noreply.github.com>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
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.
Fixes #1524
Problem
check_index_coverage'sinputSchemahad a top-levelanyOf:Anthropic (Claude), AWS Bedrock, Google Vertex/Gemini, and Azure OpenAI reject custom tool schemas containing a top-level
oneOf/allOf/anyOf. Once this tool's schema reaches the model (e.g. aftertools/list), the provider rejects the request outright, breaking every tool call in the session for MCP clients backed by those providers.Fix
anyOffromcheck_index_coverage'sinputSchema.pathsorscopes" requirement was already enforced independently at runtime inhandle_check_index_coverage(path_count == 0U && scope_count == 0Urejection), so no validation is lost.paths/scopesproperty descriptions so it's still discoverable by callers.src/mcp/mcp.cusesoneOf/allOf/anyOf(verified via grep), so this was the only occurrence of the defect.Testing
make -f Makefile.cbm cbm— clean build.make -f Makefile.cbm test-focused TEST_SUITES=mcp(ASan+UBSan) — 192 passed, 2 skipped (Windows-only), 0 failed, including all 6tool_check_index_coverage_*tests exercising paths/scopes/error paths.tools/list) that the liveinputSchemaforcheck_index_coverageno longer containsanyOf, only"required":["project"].scripts/check-dco.sh origin/main..HEADpasses.This is a one-file, no-behavior-change fix (schema only); scope is limited to the bug fix per the "bug fixes ... welcome without prior discussion" exception in CONTRIBUTING.md, and #1524 documents the root cause and repro for maintainer review.