CodeReview

v0.13.5
io.github.PHPatch/codereview Checked 3 days ago Published 12 days ago

Multi-model review gate for AI-written code: independent reviewers, one deterministic verdict.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

run_gate

Run the CodeReview gate on a change and return the verdict plus the run record's path. Give either `patch` (unified diff text) or `range` (a git range such as HEAD~1..HEAD, evaluated in `repo`); with neither, the repo's working-tree change is reviewed, as with the CLI. Seats come from the operator's saved CodeReview setup — with no setup the call fails with the setup instructions, exactly like the CLI.

ParameterTypeDescription
contextstringbuilder's change description, shown to the reviewers. Literal text only: a leading @ is NOT treated as a file path (unlike the CLI's --context, MCP context is never read from disk)
outstringoutput directory for the run record (default: <repo>/codereview-out); when the operator configures a path root, it must resolve inside that root
patchstringunified diff text (mutually exclusive with range)
policystringproject policy file (TOML) named by the caller. A caller-named policy is ALWAYS applied in restricted form (pre-review condition, 2026-11-10): only its strengthening keys take effect — hooks and gat…
rangestringgit diff range, e.g. main...HEAD
repostringrepository path (default: the server's working directory). When the operator starts the server with a path root (--root / $CODEREVIEW_MCP_ROOT), it must resolve inside that root

get_verdict

Read a stored CodeReview run record and return its verdict summary and findings. `record` is a record JSON file or the directory holding it (the newest timestamped record in the directory wins, as with the CLI's record arguments).

ParameterTypeDescription
record *stringrecord JSON file or record directory; when the operator configures a path root, it must resolve inside that root
repostringrepository the record belongs to (default: the server's working directory); when the operator configures a path root, it must resolve inside that root