git-mcp-server: Merge remote ref
git_mergeMerge a specified remote-tracking ref from a fetch session into the current local branch, using fast-forward or native merge, and creating a merge session for conflicts.
Instructions
Operation: Merge the exact remote_ref and object bound to one fetch_id. Returns: request_id, repository_id, head, nullable merge_session_id, and conflicted paths. Defaults: allow fast-forward or a native merge commit; conflicts create an owned session. Excludes: rebase, arbitrary local refs or unobserved object IDs, and external merge sessions.
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>",
"fetch_id": "<fetch_id>",
"remote_ref": "<remote_ref>",
"expected_remote_object": "<expected_remote_object>"
},
"name": "git_merge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fetch_id | Yes | Bridge-issued fetch session ID that binds the allowed remote-tracking observation. | |
| remote_ref | Yes | Exact origin remote-tracking ref observed in fetch_id; arbitrary local refs are forbidden. | |
| 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_object | Yes | Exact Git object ID that fetch_id observed at remote_ref. |
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 |