git_diff
Compare working tree, staged changes, or commits and branches to review code modifications; optionally limit to a file or show file stats.
Instructions
Show git diff. Compare working tree, staged changes, or between refs/commits.
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_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | First git ref (commit/branch) | |
| file | No | File path to diff | |
| ref2 | No | Second ref for comparison | |
| stat | No | Show file stats only | |
| staged | No | Show staged changes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| action | Yes | ||
| entries | No |