git-mcp-server: Abort merge
git_merge_abortAbort a specific conflicted merge session and restore the original branch state. Requires repository, branch, HEAD, and merge session identifiers.
Instructions
Operation: Abort the exact owned merge_session_id and restore its original merge state. Returns: request_id, repository_id, and the restored head object ID. Defaults: all inputs are required and owned cleanup follows durable completion. Excludes: external merge sessions, generic reset, unrelated paths, and 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>",
"merge_session_id": "<merge_session_id>"
},
"name": "git_merge_abort"
}
}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. | |
| merge_session_id | Yes | Owned conflicted merge-session ID to abort; external merge state is rejected. |
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 |