Review Diff
review_diffRisk-scan a unified diff the way a senior reviewer triages a PR. FREE.
Flags added lines matching known risk patterns (injection sinks, disabled TLS, bare excepts, debug prints, TODOs, N+1 hints, leaked secrets) with the new-file line number and a severity (1 low - 4 high). Typical input {"diff": ""} returns {"added_lines": N, "risk_score": 0-100, "verdict": "...", "secrets": [...], "findings": [{"line": N, "severity": 1-4, "issue": "...", "code": "..."}], "note": "..."}.
Use on a unified diff, when only the change matters. Not for whole-file analysis (complexity_report, ai_code_smell_scan). Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""}. Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
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": {
"diff": "<diff>"
},
"name": "review_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | A unified diff exactly as produced by `git diff`, text with @@ hunk headers and +/- line prefixes. Only added (+) lines are scanned. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||