- Notifications
You must be signed in to change notification settings - Fork931
Closed
Description
Description
When trying to update a file using the create_or_update_file tool, I'm encountering an error where the SHA parameter isn't being supplied, resulting in a 422 Invalid request from the GitHub API.
Error Message
Failed to call tool create_or_update_file: Error: MCP error -32603: failed to https://api.github.com/repos/evanmcgillivray/Budget/contents/src/components422 Invalid request. "sha" wasn't supplied. []
Steps to Reproduce
- Using the MCP server with an AI assistant
- Attempting to update a file in a repository
- The MCP server fails to include the required SHA parameter in the request
Expected Behavior
The MCP server should properly include the SHA parameter when updating files, as required by the GitHub API.
Additional Information
- GitHub requires the SHA parameter when updating a file to ensure you're updating the correct version
- This appears to be happening specifically when trying to update a file via the create_or_update_file function