Git commit
git_commitCommit local changes by staging provided paths or using already staged files, with optional amend; no merge, rebase, or push is performed.
Instructions
Commit changes. Without paths: commit whatever is staged (paths given to it are staged first with git add). Amend is opt-in. Use when: your edits are ready to be committed locally. Avoid when: nothing should be committed (git only stages when paths are given, or you already staged). Merge/rebase and push are not performed. Output: sha, short_sha, subject, files_changed, files, amend. No staged changes gives invalid_request (pass paths or stage first).
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": {
"message": "<message>"
},
"name": "git_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amend | No | true amends HEAD instead of creating a new commit. | |
| paths | No | Optional workspace-relative paths to stage. Omit to commit what is already staged. | |
| reason | No | Optional why (max 400 chars), audit-logged. | |
| message | Yes | Commit message (first line is the subject). | |
| allow_empty | No | true allows an empty commit (git commit --allow-empty). |