diff --git a/README.md b/README.md index 8ba842a46..70e8c3ca1 100644 --- a/README.md +++ b/README.md @@ -870,7 +870,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description - `owner`: Repository owner (username or organization) (string, required) - `path`: Path where to create/update the file (string, required) - `repo`: Repository name (string, required) - - `sha`: SHA of file being replaced (for updates) (string, optional) + - `sha`: Required if updating an existing file. The blob SHA of the file being replaced. (string, optional) - **create_repository** - Create repository - `autoInit`: Initialize with README (boolean, optional) diff --git a/pkg/github/__toolsnaps__/create_or_update_file.snap b/pkg/github/__toolsnaps__/create_or_update_file.snap index dfbb34423..61adef72c 100644 --- a/pkg/github/__toolsnaps__/create_or_update_file.snap +++ b/pkg/github/__toolsnaps__/create_or_update_file.snap @@ -31,7 +31,7 @@ "type": "string" }, "sha": { - "description": "SHA of file being replaced (for updates)", + "description": "Required if updating an existing file. The blob SHA of the file being replaced.", "type": "string" } }, diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index cf71a5839..8a7a8af4a 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -288,7 +288,7 @@ func CreateOrUpdateFile(getClient GetClientFn, t translations.TranslationHelperF mcp.Description("Branch to create/update the file in"), ), mcp.WithString("sha", - mcp.Description("SHA of file being replaced (for updates)"), + mcp.Description("Required if updating an existing file. The blob SHA of the file being replaced."), ), ), func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {