create_or_update_file
Create or update files in a GitHub repository with specified content, commit message, and branch. Manage file changes programmatically using the PyGithub MCP Server for efficient repository operations.
Instructions
Create or update a file in a GitHub repository.
Args:
params: Dictionary with file parameters
- owner: Repository owner (username or organization)
- repo: Repository name
- path: Path where to create/update the file
- content: Content of the file
- message: Commit message
- branch: Branch to create/update the file in
- sha: SHA of file being replaced (for updates, optional)
Returns:
MCP response with file creation/update result
Input Schema
Name | Required | Description | Default |
---|---|---|---|
params | Yes |
Input Schema (JSON Schema)
{
"properties": {
"params": {
"title": "Params",
"type": "object"
}
},
"required": [
"params"
],
"title": "create_or_update_fileArguments",
"type": "object"
}