create_or_update_file
Create or update a single file in a GitHub repository
Purpose
This skill provides access to the MCP tool create_or_update_file. It allows you to create or update a single file in a github repository.
Parameters
The tool accepts the following parameters:
owner
Required
- Type:
string - Description: Repository owner (username or organization)
repo
Required
- Type:
string - Description: Repository name
path
Required
- Type:
string - Description: Path where to create/update the file
content
Required
- Type:
string - Description: Content of the file
message
Required
- Type:
string - Description: Commit message
branch
Required
- Type:
string - Description: Branch to create/update the file in
sha
Optional
- Type:
string - Description: SHA of the file being replaced (required when updating existing files)
Usage Instructions
To use this tool:
- Prepare the parameters according to the schema above
- Invoke the MCP tool
create_or_update_filewith the prepared parameters - Process the result returned by the tool
Example
{
"owner": "example_value",
"repo": "example_value",
"path": "example_value",
"content": "example_value",
"message": "example_value",
"branch": "example_value",
"sha": "example_value"
}
Notes
- This skill requires an active MCP connection to the server providing the
create_or_update_filetool - Ensure the MCP server is properly configured and running before attempting to use this tool
- Review the parameter requirements carefully to avoid errors