git-mcp-server: Push branch
git_pushPush the current branch HEAD to the same branch on origin using atomic lease and provenance verification, ensuring safe, non-force updates.
Instructions
Operation: Push current branch HEAD to the same branch on origin using expected-remote CAS and ancestry proof. Returns: request_id, repository_id, local_head, and remote_head object IDs. Defaults: origin and current branch are fixed, an internal exact lease is used, and null expectation means absence. Excludes: non-fast-forward updates, caller force or refspec, tags, delete, and automatic retry.
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": {
"repository": "<repository>",
"request_id": "<request_id>",
"expected_branch": "<expected_branch>",
"expected_head": "<expected_head>",
"expected_remote_head": "<expected_remote_head>"
},
"name": "git_push"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| expected_remote_head | Yes | Exact expected origin branch head for atomic lease comparison, or null only when the branch is expected absent. |
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 |