Commit file changes to GitHub
github_commit_filesCommits multiple file changes to a GitHub branch atomically. Use dry-run to preview sizes, line changes, and edit matches before applying.
Instructions
One atomic commit that adds, updates, edits or deletes several files on a branch (Git Data API); the site's CI/CD then deploys. Per file give exactly one of: content (full replacement; set encoding=base64 for binary), edits (in-place find/replace against the branch's current file, right for large files such as a 300 KB content bundle), or delete. createBranch=true creates the branch from the default branch first. dryRun previews sizes, changed-line counts and whether each edit matches exactly once, without committing.
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>",
"branch": "<branch>",
"message": "<message>",
"files": "<files>"
},
"name": "github_commit_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository as 'owner/name', e.g. 'octocat/my-site'. | |
| files | Yes | ||
| branch | Yes | Branch to commit to, e.g. 'main'. | |
| dryRun | No | Preview only: report each file's action, sizes and changed-line counts (edits are validated) without committing. | |
| message | Yes | Commit message in the repository's conventions. | |
| createBranch | No | If true, create `branch` from the repo's default branch when it does not exist yet. |