modelcontextprotocol / modelcontextprotocol/php-sdk
[Schema] No support for additonalProperties in tool input schema
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 173
- Avg merge
- 2d 49m
- Merged PRs (30d)
- 23
Description
Is your feature request related to a problem? Please describe.
There is no proper support for "strict" json schema mode in tool input schema due to not having 'additionalProperties' field.
Describe the solution you'd like
Support 'additionalProperties' in tool input schema same like in tool output schema.
Describe alternatives you've considered
Ignoring phpstan sealed array rule - makes code less reliable.
Additional context
This is sometimes needed when integrating mcp server with software that requires tool input/output schema to follow strict json schema (no additional properties allowed for example, all fields required etc). These sometimes refuse to work with tools whose schema isn't 'strict' enough.
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.
Research direction
Start by locating the tool input schema definition and compare it with the existing tool output schema support for additionalProperties. Verify the resulting input schema against strict JSON Schema requirements and confirm that integrations accepting strict tool schemas now work as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100