git_diff
Return Git diffs showing changed files and diff text, with truncation to prevent context overload. Use for reviewing code changes and comparing working tree to index.
Instructions
Returns the Git diff for a repository, showing changed files and diff text. Output is capped to prevent context flooding, with a truncated flag if the cap was hit. The repo path must be within allowed roots.
Use this when investigating what code changes were made, comparing working tree to index, or reviewing staged changes. Does not modify system state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| cached | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |