From 676a5889305feca90e53b78d4c455eb5967094eb Mon Sep 17 00:00:00 2001 From: Artem Sierikov Date: Tue, 24 Mar 2026 17:01:20 +0100 Subject: [PATCH] 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 --- pkg/github/__toolsnaps__/push_files.snap | 1 + pkg/github/repositories.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/github/__toolsnaps__/push_files.snap b/pkg/github/__toolsnaps__/push_files.snap index c36c236f9..df6c4d1e7 100644 --- a/pkg/github/__toolsnaps__/push_files.snap +++ b/pkg/github/__toolsnaps__/push_files.snap @@ -12,6 +12,7 @@ "files": { "description": "Array of file objects to push, each object with path (string) and content (string)", "items": { + "additionalProperties": false, "properties": { "content": { "description": "file content", diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index 9376ddad4..f7e3cf5f4 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -1233,7 +1233,8 @@ func PushFiles(t translations.TranslationHelperFunc) inventory.ServerTool { Type: "array", Description: "Array of file objects to push, each object with path (string) and content (string)", Items: &jsonschema.Schema{ - Type: "object", + Type: "object", + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, Properties: map[string]*jsonschema.Schema{ "path": { Type: "string",