GitHub commit files
github_commit_filesCommit one or more files to a GitHub repository. Prefer the exact owner from github_list_repositories; 'repo' also accepts the combined 'owner/name' form. Creates or updates files in a single atomic commit. Use this to add Dockerfiles, CI workflows, configuration files, etc. Maximum 20 files and 500KB total content per commit.
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>",
"files": "<files>",
"commit_message": "<commit_message>"
},
"name": "github_commit_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. Also accepts the combined 'owner/name' form. | |
| files | Yes | Files to create or update. Each entry has a 'path' and 'content'. | |
| owner | Yes | Repository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. May be embedded in 'repo' as 'owner/name'. | |
| branch | No | Branch to commit to. Defaults to the repository's default branch. | |
| merge_parent | No | Merge another branch of this repository into 'branch': its name, never a commit id. The commit becomes a true merge commit whose parents are 'branch' and merge_parent, carrying every change merge_parent made since the two diverged with its file modes. 'files' must then resolve every file both sides changed since they diverged, with the complete merged content or as a deletion; the call is refused, naming them, while any is unresolved. Use it to resolve a pull request that conflicts with its base: merge_parent is the base branch and 'branch' the pull request's branch, never the default branch. | |
| commit_message | Yes | Git commit message describing the changes. | |
| staged_change_id | No | Optional: the staged_change_id a workspace_bump_dependency call answered. The files the package manager regenerated (the lockfile and its manifest) are added to this commit exactly as it wrote them; pass any other files you change in 'files' (an empty list when there are none). Never write a lockfile yourself. | |
| confirm_large_deletions | No | Paths from 'files' whose new content is intentionally much shorter than the file it replaces. A commit that would replace an existing file with less than half of its content is refused unless that path is listed here. Leave this out unless a refusal named the path and removing that much is the change you intend. |