getDiffBetweenRefs
Compare two Git refs to retrieve file changes and patches. Optionally limit the diff to one file or get a file-level summary.
Instructions
Diff between two git refs (branches/tags/commits). statOnly for file-level summary only.
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": {
"ref1": "<ref1>",
"ref2": "<ref2>"
},
"name": "getDiffBetweenRefs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref1 | Yes | Base ref (branch, tag, or commit hash) | |
| ref2 | Yes | Comparison ref (branch, tag, or commit hash) | |
| context | No | Number of context lines around changes. Default: 3 | |
| filePath | No | Limit diff to a single file (absolute or workspace-relative) | |
| statOnly | No | Return file-level stat summary only (no patch). Default: false. |