git-mcp-server: Commit staged changes
git_commitCommit staged index content to a Git repository with branch and head validation, ensuring idempotent and hook-checked commits.
Instructions
Operation: Commit the exact index owned by one stage_id with native hooks and signing disabled. Returns: request_id, repository_id, commit and tree object IDs, hook_changed_paths, and signing policy; a rejected pre-commit or commit-msg hook returns HOOK_FAILED with only its allowlisted hook kind. Defaults: all inputs are required, native hooks run, and signing stays disabled. Excludes: raw hook output or exit status, amend, arbitrary index content, implicit staging, push, and hook bypass.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Commit message passed only on standard input; it must contain 1 through 100000 characters. | |
| stage_id | Yes | Owned normal-stage session ID whose exact index content will be committed. | |
| repository | Yes | Absolute path to the exact target Git worktree for this mutation. | |
| request_id | Yes | Client-generated UUID that makes this mutation durable and idempotent for exact replay. | |
| expected_head | Yes | Exact current local HEAD object ID expected before mutation; mismatch rejects without Git mutation. | |
| expected_branch | Yes | Exact current local branch name expected before mutation; mismatch rejects without Git mutation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| error | No | ||
| status | Yes | ||
| warnings | Yes | ||
| operation | Yes | ||
| request_id | No | ||
| repository_id | No | ||
| observed_after | No | ||
| observed_before | No |