git_diff
Show changes between commits, branches, or the working tree; compare staged changes and use commit ranges like HEAD...origin/master to inspect differences.
Instructions
Show changes between commits, commit and working tree, etc. Supports commit ranges like HEAD...origin/master
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 |
|---|---|---|---|
| files | No | Specific files to show diff for (defaults to all files) | |
| cached | No | Show diff of staged changes | |
| repoPath | No | Path to git repository (defaults to current directory) | |
| toCommit | No | Ending commit/branch for comparison (e.g., "origin/master", commit hash). Defaults to working tree if not specified | |
| fromCommit | No | Starting commit/branch for comparison (e.g., "HEAD", "main", commit hash) | |
| useThreeDotRange | No | Use three-dot range (fromCommit...toCommit) to show changes on toCommit since it diverged from fromCommit |