git-mcp-server: Fetch remote
git_fetchFetch origin heads into a fixed tracking namespace under a constrained policy. Validates expected branch and head for safe mutation.
Instructions
Operation: Fetch origin heads into the fixed origin-tracking namespace under a constrained policy. Returns: request_id, repository_id, fetch_id, before and after refs, sanitized remote identity, and fetch time. Defaults: origin, standard upload-pack, and no tags, prune, or submodules. Excludes: caller remote or refspec, custom helper, merge, tag updates, nested repository mutation, 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>"
},
"name": "git_fetch"
}
}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. |
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 |