Show config git diff
git_diffDisplay unstaged tracked-file changes or a commit's stat summary to review edits before committing or inspect a past commit's scope.
Instructions
Show unstaged changes, or one commit's stat summary.
Without sha, calls repo.git.diff() for the unified diff of unstaged
changes to tracked files in /config, excluding staged changes and
untracked new files (see git_status). With sha, calls git show --stat <sha> for the commit header and per-file changed-line counts,
not the actual patch.
Use when: reviewing what changed before committing, or summarising one
past commit.
Returns: str, the raw diff or stat text.
Errors: raises RuntimeError (from _repo()) when no git repo exists;
raises an exception from gitpython when sha does not resolve to a
commit.
Limits: output is raw, unformatted text and can be large for big diffs.
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 |
|---|---|---|---|
| sha | No | Commit SHA or ref to show a stat summary for, e.g. 'a1b2c3d'. Omit to show the unstaged diff instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |