[Schema] SEP-2106: Support JSON Schema 2020-12 vocabulary in SchemaGenerator (oneOf/anyOf/allOf/if-then-else/$ref)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- php
- Domain
- api, backend-api-design
Research direction
Start with umbrella issue #337 and SEP-2106, then inspect src/Capability/Discovery/SchemaGenerator.php and SchemaValidator.php along with the #[Schema] attribute and reflection/DocBlock paths mentioned here. Map the existing simple schema flow before assessing how composition, conditionals, references, and union types should be surfaced and validated. Done means the listed JSON Schema 2020-12 vocabulary is supported across these paths without weakening same-document $ref defaults.
Written by the indexing model from the issue text.
Description
Implements the vocabulary portion of SEP-2106 for the MCP Spec 2026-07-28 release.
Tracked by umbrella #337.
Spec summary
inputSchemakeepstype: "object"required but accepts any JSON Schema 2020-12 vocabulary (oneOf/anyOf/allOf/not,if/then/else,$ref/$defs/$anchor).
PHP SDK changes
src/Capability/Discovery/SchemaGenerator.phpandSchemaValidator.phpneed to emit/validate full JSON Schema 2020-12 composition, conditionals,$ref(same-document only by default).#[Schema]attribute should accept composition keywords.- Reflection/DocBlock paths today produce simple
{type, properties}only — extend to surface union types asoneOf/anyOf.
Related
- Umbrella #337
- Companion sub-issues: non-object outputSchema,
$refhardening
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 173
- Avg merge
- 2d 49m
- Merged PRs (30d)
- 23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/php-sdk
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan OpenServer
Difficulty 1/5 Under an hour Newbie friendliness 78/100
modelcontextprotocol/php-sdk#468 · 2 comments ·
-
needs confirmation needs maintainer action Server
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/php-sdk#398 · 1 reaction ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
modelcontextprotocol/php-sdk#510 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
modelcontextprotocol/php-sdk#504 ·
All issues in modelcontextprotocol/php-sdk
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·