git_diff
Retrieves Git diffs of code changes between the working directory, HEAD, or specified branches, providing the exact changes needed to generate accurate commit messages.
Instructions
Get git diff showing code changes.
Usage:
No params: working directory changes vs HEAD
compare="branch": HEAD vs branch
base="dev", compare="feature": feature vs dev (shows changes in feature relative to dev)
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 |
|---|---|---|---|
| base | No | Base branch or commit (default: HEAD) | |
| compare | No | Branch or commit to compare (default: working directory) |