Diff Review

Review a git diff for potential bugs, security issues, error handling and test gaps. Returns findings with severity and file references.

AI-generated diff-review

Example

Example input
{
  "diff": "diff --git a/README.md b/README.md\n--- a/README.md\n+++ b/README.md\n@@ -1 +1,2 @@\n # Project\n+Added docs.\n"
}

The fields it answers with are listed under Output fields.

Inputs

FieldTypeRequiredWhat it is
diffstringYesUnified diff text (output of `git diff`)
focusstringNoOptional focus area (bugs, security, performance, test-gaps, or all)
contextstringNoOptional project context (e.g. "TypeScript API server using Hono")

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
issuesarrayAlways (present in every successful answer)
summarystringAlways (present in every successful answer)
diff_statsobjectAlways (present in every successful answer)
risk_levelstringAlways (present in every successful answer)
todos_addedarrayAlways (present in every successful answer)
missing_testsarrayAlways (present in every successful answer)
approval_reasonstringAlways (present in every successful answer)
hardcoded_valuesarrayAlways (present in every successful answer)
approval_recommendationstringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "diff-review",
    "inputs": {
      "diff": "diff --git a/README.md b/README.md\n--- a/README.md\n+++ b/README.md\n@@ -1 +1,2 @@\n # Project\n+Added docs.\n"
    },
    "max_price_cents": 10
  }'

Limitations

  • Diff size limited to ~12,000 characters

    Input diffs are limited to about 12,000 characters and larger diffs are truncated. Split large changes into separate file diffs.

  • AI-generated analysis

    Generated findings can include false positives or miss subtle issues requiring wider project context.

  • Output size cap per call

    Structured output is limited to about 2000 output tokens per call; requests exceeding this limit are refused rather than returned truncated. A dense diff can exceed the output limit even within the 12,000-character input limit; an identical retry does not help.

    What to do instead: Provide a smaller diff (fewer files or lines) per call

Bundled checks that include it