get_git_diff
Retrieve the deterministic Git diff of repository changes to inspect modifications, optionally scoped by path or staged status.
Instructions
Retrieve the deterministic Git diff of changes made in the repository.
Args: path: Optional relative file or directory path to scope the diff. cached: If True, inspects staged changes (git diff --cached) (default: False).
Returns: JSON string containing diff string, has_changes boolean, and changed_files list.
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": "get_git_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| cached | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |