Repository navigation
fix(mcp): emit valid schemas for empty arrays - #535
Merged
Merged
Conversation
Replace empty tuples with a shared empty-array schema. Validate all input and output schemas against Draft 2020-12 during catalog generation and packaged MCP verification, with runtime and catalog regression coverage. Closes #528 Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Collaborator
Author
|
LGTM! |
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
Replace empty tuples with a shared empty-array schema. Validate all input and output schemas against Draft 2020-12 during catalog generation and packaged MCP verification, with runtime and catalog regression coverage. Closes morluto#528 Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
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.
Summary
compare_web_capturesand the invalid output schemas of seven tools, while preserving rejection of nonempty arrays.tools/list, the generated catalog, and empty-array semantics. Regenerate the catalog and dependent identity metadata through the normal generators.Closes #528.
MCP schema example
The affected
tools/listfields now use this valid empty-array representation:{ "missing_sections": { "type": "array", "items": { "not": {} }, "minItems": 0, "maxItems": 0 } }Regression evidence
tools/listresponses confirms that only the empty-array schema representation changes.Verification
Commands were run with the isolated Node 24 toolchain:
check:pr: 363 test files passed; 1,911 tests passed and two existing platform-dependent tests skipped, plus typecheck, lint, format, dependency-use, metadata, and generated-document checks.For the package lane, a temporary directory outside the checkout prevents Node from resolving omitted optional dependencies from the checkout's
node_modules. Ghidra variables are removed only for that command so the fixture provider is selected without interference from the local bring-your-own installation. No host defaults were changed.Provider verification
Real Hopper/Ghidra verification was not run for this schema-only change. The package lane uses fixture providers; the separate stdio MCP schema check uses the actual server without opening a target. No live Anthropic API request was made.