review_git_diff
Reviews staged, working-tree, or base-branch Git diffs and returns structured risk findings, summaries, and metrics, with an offline mock mode for credential-free local checks.
Instructions
Review a repository's git diff and return structured findings.
Args: repo_path: Path to the repository (any directory inside the work tree). mode: Diff source: "staged" (default), "working", or "base". base_ref: Branch or commit to diff against; required when mode="base". mock: Use the offline heuristic analyzer instead of calling the xAI API.
Returns: A JSON-serialisable report with summary, overall_risk, findings and metrics. Findings flagged in mock mode never came from the xAI API.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_path": "<repo_path>"
},
"name": "review_git_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mock | No | ||
| mode | No | staged | |
| base_ref | No | ||
| repo_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||