Skip to content

Commit b01f7f5

Browse files
sierikovSamMorrowDrums
authored andcommitted
fix: additionalProperties in push_files schema (#2011)
Some MCP clients require array item schemas to explicitly set `additionalProperties: false`. Without this, `push_files` calls will fail. Fixes #2011 Research and fix was initially done by @04cb
1 parent 2a1eaac commit b01f7f5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/github/__toolsnaps__/push_files.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"files": {
1313
"description": "Array of file objects to push, each object with path (string) and content (string)",
1414
"items": {
15+
"additionalProperties": false,
1516
"properties": {
1617
"content": {
1718
"description": "file content",

pkg/github/repositories.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,8 @@ func PushFiles(t translations.TranslationHelperFunc) inventory.ServerTool {
12721272
Type: "array",
12731273
Description: "Array of file objects to push, each object with path (string) and content (string)",
12741274
Items: &jsonschema.Schema{
1275-
Type: "object",
1275+
Type: "object",
1276+
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
12761277
Properties: map[string]*jsonschema.Schema{
12771278
"path": {
12781279
Type: "string",

0 commit comments

Comments
 (0)