Commit files to GitHub
gh_commitCommit up to 100 files in one commit: add or change ({path, content}, encoding base64 for binary, executable true for scripts) or delete ({path, delete: true}). branch is made from from (default the main branch) when it does not exist yet. In the default mode commits go to other branches than the main one (then open a pull request with gh_pull_create), except on repositories AskYourStack created or empty ones.
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": {
"repo": "<repo>",
"message": "<message>",
"files": "<files>"
},
"name": "gh_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Where a new branch starts. | |
| repo | Yes | owner/name, like shopwhizzy/client-shop (or a GitHub address). | |
| files | Yes | ||
| branch | No | Default the repository's main branch. | |
| message | Yes |