Git Diff Viewer
git_diffView code changes in the Git working tree or staging area, optionally for a specific file, to inspect modifications before committing.
Instructions
查看 Git 工作区或暂存区的代码变更内容。
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 |
|---|---|---|---|
| file | No | 可选仅查看指定文件的 diff | |
| staged | No | 是否查看已暂存变更 (--cached) | |
| repoPath | No | Git 仓库路径 |