git_diff
View unified diffs for unstaged, staged, head, or any branch/commit changes. Preview per-file change counts with stat_only before examining the full diff.
Instructions
Show changes as a unified diff. against="worktree" (default, unstaged changes), "staged", "head" (staged + unstaged), or a branch/commit name to compare the current branch against it (uses the merge base). Use stat_only=true first on a large change to see which files moved before pulling in the full diff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Limit the diff to these paths. | |
| against | No | "worktree" | "staged" | "head" | branch or commit ref. Default "head". | |
| stat_only | No | Only per-file change counts. Default false. | |
| workspace | No | Workspace alias. Defaults to the active workspace. | |
| context_lines | No | Context lines around each hunk. Default 3. |