Git Fetch
git_fetchDownload objects and references from a remote Git repository to update local tracking branches without merging changes.
Instructions
Fetch updates from a remote repository. Downloads objects and refs without merging them.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_fetch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| remote | No | Remote name (default: origin). | |
| prune | No | Prune remote-tracking references that no longer exist on remote. | |
| tags | No | Fetch all tags from the remote. | |
| depth | No | Create a shallow clone with history truncated to N commits. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| remote | Yes | Remote name that was fetched from. | |
| fetchedRefs | Yes | References that were fetched from the remote. | |
| prunedRefs | Yes | References that were pruned (deleted locally). |