git_diff
Compare a repository's working tree against HEAD or a base revision and return diff stats or patch pages, with protected files shown as notices.
Instructions
Read working tree versus HEAD or base...HEAD diff, with protected files replaced by notices. No approval window; client Host in both modes. Fixed Git never runs repository hooks/filters or configured programs. Maximum 3 processes, 15 seconds each; content pages <=64 KiB with next_offset. Sanitized errors; never auto-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": {
"path": "<path>"
},
"name": "git_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Optional revision: 1..200 ASCII letters/digits or ._/@^~-; no leading -, .. or colon; compares base...HEAD. | |
| path | Yes | Absolute repository directory within configured read roots, including read: folders; top must also be allowed. | |
| paths | No | Optional maximum 32 literal relative paths inside repository and read roots; no traversal, options, colon, NUL or newline. | |
| offset | No | Byte cursor 0..268435456 from next_offset; 64 KiB pages. Repository changes between calls can change pages. | |
| stat_only | No | Return only the diff stat instead of a patch; default false compares working tree against HEAD. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||