create_or_update_file
Create a new file or update an existing file in a GitHub repository with a commit message, path, and content.
Instructions
Create or update a file in a repository
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>",
"message": "<message>",
"content": "<content>"
},
"name": "create_or_update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | No | The blob SHA of the file being replaced. Required to update an existing file. | |
| path | Yes | ||
| repo | Yes | ||
| owner | Yes | ||
| branch | No | Optional branch name | |
| content | Yes | File content | |
| message | Yes | Commit message |