git_diff
Generate the git diff of a repository as file-level stats or a paginated patch. Limit by ref, path, and patch lines to inspect changes without loading large diffs.
Instructions
Return the git diff for a repository (stat + optional patch). Prefer stat_only=True for orientation.
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": {
"repo": "<repo>"
},
"name": "git_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Diff target ref or range. Examples: "HEAD~1" (last commit), "main...HEAD" (branch diff), "abc123" | HEAD~1 |
| path | No | Repo-relative file path to limit the diff scope (optional). Leave empty for the full diff. | |
| repo | Yes | Repository name from list_repositories(), e.g. "pypto" | |
| stat_only | No | When True return only file-level statistics (no patch text). Useful for large diffs. | |
| patch_offset | No | Zero-indexed patch line offset for pagination | |
| max_patch_lines | No | Maximum patch lines to return (100–2000) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||