fix: additionalProperties in push_files schema (#2011)#2257
fix: additionalProperties in push_files schema (#2011)#2257SamMorrowDrums merged 2 commits intogithub:mainfrom
Conversation
Some MCP clients require array item schemas to explicitly set `additionalProperties: false`. Without this, `push_files` calls will fail. Fixes github#2011 Research and fix was initially done by @04cb
There was a problem hiding this comment.
Pull request overview
This PR fixes strict MCP client schema validation failures by explicitly disallowing additional properties on the files array items for the push_files tool, aligning the generated JSON Schema with clients that require additionalProperties: false.
Changes:
- Set
additionalProperties: falsefor thefilesarray item schema in thepush_filestool input schema. - Updated the
push_filestoolsnap to reflect the schema change.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pkg/github/repositories.go |
Updates the push_files input schema so files.items explicitly forbids additional properties. |
pkg/github/__toolsnaps__/push_files.snap |
Updates the schema snapshot to match the generated tool schema. |
|
Thanks for this, apologies it fell off the radar, it's very frustrating this validation because SDKs themselves don't produce output for it, and it seems kind of ridiculous that anyone could/would end up in a position where they are forcing server developers to make changes beyond the specification. If the specification is not strict enough, they should be pushing to fix it at that level. |
Context
Some MCP clients require array item schemas to explicitly set
additionalProperties: false. Without this,push_filescalls will fail.Summary
Add
additionalProperties: falseto thefilesarray item schema in thepush_filestool so MCP clients that strictly validate schemas can use it without errors.Why
Fixes #2011.
Research and fix was initially done by @04cb.
What changed
AdditionalPropertiesto the files array item schema inpkg/github/repositories.gopkg/github/__toolsnaps__/push_files.snapto matchMCP impact
push_filestool schema now explicitly includesadditionalProperties: falseon thefilesarray items. This is a non-breaking, additive change.Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testDocs