Repository navigation
Conversation
A tool's input schema can list a name in `required` that isn't defined in `properties`, usually after a parameter rename that forgot to update `required`. This adds the lint rule for it, running by default like MCPP001-MCPP007; with --nested it also checks nested objects and array items. A property defined through a local $ref counts as defined, and an unresolved $ref is skipped to avoid false positives. Fixes #8 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKdT6qJ3EG6ptrGZ1zEnXX
- allOf branches are unioned into the required/properties check
(following local $ref inside a branch); anyOf/oneOf are skipped
entirely rather than guessing which branch applies, matching the
caution MCPP016 already uses for enums under combinators.
- A required entry written alongside a $ref is now checked against
the ref's resolved properties (via TryResolveRef) instead of being
dropped by the walk's plain TryFindTarget swap. This runs for every
visited node, including the top level, regardless of
CheckNestedParameters.
- Nested finding messages now quote the full path ("Property
'home.floor'...") like MCPP003/MCPP007, not the bare name.
- README notes MCPP008 only checks inputSchema.
- Rebased onto main (#24 merged); kept both CHANGELOG sections.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKdT6qJ3EG6ptrGZ1zEnXX
ShmueLior
force-pushed
the
mcpp008-required-property-not-defined
branch
from
November 29, 2026 17:53
616a91a to
9cdf827
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.
Summary
requiredthat has no matching entry inproperties(commonly left behind after a parameter rename). ChecksinputSchemaonly.--nested/CheckNestedParameters, also checks nested object properties and array items.allOfbranches are unioned into the check (following local$refs inside a branch);anyOf/oneOfare skipped entirely, since only one branch has to apply and we can't tell which statically (same caution MCPP016 already uses for enums under combinators).requiredentry written alongside a$refis checked against the ref's resolved properties (viaTryResolveRef), not dropped — this runs for every visited node, including the top level, regardless ofCheckNestedParameters. An unresolved$refis skipped to avoid false positives.Fixes #8
Review feedback addressed
allOf/anyOf/oneOfcomposition — fixed per above.requirednext to a$refwas being dropped by the walk's plain ref swap — now resolved independently viaTryResolveRef.main(Add discoverability tags and README opening line #24 merged); kept both CHANGELOGUnreleasedsections.Property 'home.floor'...), matching MCPP003/MCPP007.inputSchemaonly.Test plan
properties, duplicaterequiredentries, multiple missing names,allOfunion (plain and through a$refbranch),allOfwith a name missing across all branches,anyOf/oneOfskip,$ref+ siblingrequired(defined and missing cases, with and without--nested), unresolvable$ref+ siblingrequired, nested objects and array itemsdotnet test --solution McpProbe.slnx -c Release: 1254/1254 passed (net8.0 and net10.0), 0 analyzer warningsdocs/mcpprobe.schema.json, andPublicAPI.Unshipped.txthttps://claude.ai/code/session_01RKdT6qJ3EG6ptrGZ1zEnXX
Generated by Claude Code