Skip to main content
Glama

repopilot_review_change

Destructive

Review local Git changes, uncommitted or branch, before merge to find weakened tests, CI gates, security-boundary edits, and blast radius with a JSON decision report.

Instructions

Review a Git change locally: what it touched and which checks it weakened. Use it before finishing work or before a merge. By default it reviews uncommitted work (working tree vs HEAD); pass base (e.g. "origin/main") to review a branch. For a repository health check that is not about one change, use repopilot_scan instead. Returns a JSON report with a decision, findings on changed lines vs the rest, blast radius (files that import the changed files), and deterministic signals grouped by confidence tier (definitely / maybe / noise) in tiered_signals: checks the change weakened (focused or skipped tests, removed tests, tests that lost assertions, new lint/type/coverage suppressions, relaxed CI or tool gates); security-boundary changes (auth, CORS, CI, dependency manifests, committed .env); behavioral changes (network, subprocess, filesystem, env, dependency, migration, or raw SQL added; error handling, an auth check, or a test removed; a changed quiet-fallback candidate in parsed JS/TS or Python; a removed named TypeScript/JavaScript export that a resolved local caller still imports; a Rust public function whose parameter count changes while a proven module-qualified caller keeps the old argument count); algorithmic changes (deeper nesting, a new nested loop, a grown function, new recursion); and taint-lite reachability (HTTP request or process arguments reaching SQL, exec, filesystem-write, or outbound-network sinks in a changed function). Treat quiet-fallback signals as candidates to verify, not proof of harmful behavior, and preserve intentional recovery paths. Signals are evidence, not verdicts; explain one with repopilot_explain_review_signal. RepoPilot uploads nothing. Only a non-empty verify array selects configured local checks. Each selected check runs only after one-time form-mode Elicitation consent from a client that negotiated protocol 2025-11-25 and elicitation.form; otherwise it is skipped. The prompt shows the command, exact arguments, and working directory. The process still has the host user’s permissions and is not sandboxed; its captured output is bounded and redacted.

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": "repopilot_review_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoBase Git ref to diff against, e.g. "origin/main". Optional; defaults to the working tree vs HEAD.
headNoHead Git ref. Optional and only valid together with "base".
pathNoRepository path to review. Defaults to the current working directory.
limitNoMaximum findings to return.
scopeNo"changed" reports findings in the changed files only; "full" also returns findings from the rest of the repository.changed
configNoOptional repopilot.toml path. Defaults to the one discovered in the repository.
detailNo"compact" returns at most 20 findings and 20 signals; "full" returns all of them.compact
intentNoOptional inline statement of what the change is meant to touch (paths, contract families, critical paths, verification IDs). The report marks drift outside it. It is metadata only and cannot execute commands.
offsetNoZero-based finding offset.
verifyNoIDs of checks configured in repopilot.toml to request for the reviewed revision. Each needs a separate one-time user approval through form-mode Elicitation; unsupported clients skip checks. Omit to run nothing.
filtersNoOptional thresholds and rule IDs that narrow the returned findings.
profileNo"default" hides low-signal suggestions; "strict" shows all findings.default
baselineNoOptional baseline file (from `repopilot baseline create`). Findings recorded in it count as accepted debt, separate from new findings.
intent_pathNoOptional repository-rooted TOML file that states what the change is meant to touch. The report marks drift outside it. Use either this or `intent`, not both.
fail_on_reviewNo"definitely" fails the report's gate when a gate-eligible definitely-tier signal is present; "none" reports signals without gating.none

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.26.0
    • changedInput schema / properties / verify / description
      Previous value: -"IDs of checks configured in repopilot.toml to run on the reviewed revision. They run as local processes. Omit to run nothing."New value: +"IDs of checks configured in repopilot.toml to request for the reviewed revision. Each needs a separate one-time user approval through form-mode Elicitation; unsupported clients skip checks. Omit to run nothing."
  2. Changed10 schema fields changedv0.24.2
    • changedInput schema / properties / baseline / description
      Previous value: -"Optional baseline path."New value: +"Optional baseline file (from `repopilot baseline create`). Findings recorded in it count as accepted debt, separate from new findings."
    • changedInput schema / properties / config / description
      Previous value: -"Optional repopilot.toml path."New value: +"Optional repopilot.toml path. Defaults to the one discovered in the repository."
    • addedInput schema / properties / detail / description
      Added value: +"\"compact\" returns at most 20 findings and 20 signals; \"full\" returns all of them."
    • addedInput schema / properties / fail_on_review / description
      Added value: +"\"definitely\" fails the report's gate when a gate-eligible definitely-tier signal is present; \"none\" reports signals without gating."
    • addedInput schema / properties / filters / description
      Added value: +"Optional thresholds and rule IDs that narrow the returned findings."
    • changedInput schema / properties / intent / description
      Previous value: -"Optional bounded intent data. It is metadata only and cannot execute commands."New value: +"Optional inline statement of what the change is meant to touch (paths, contract families, critical paths, verification IDs). The report marks drift outside it. It is metadata only and cannot execute commands."
    • changedInput schema / properties / intent_path / description
      Previous value: -"Optional repository-rooted bounded TOML intent file."New value: +"Optional repository-rooted TOML file that states what the change is meant to touch. The report marks drift outside it. Use either this or `intent`, not both."
    • addedInput schema / properties / profile / description
      Added value: +"\"default\" hides low-signal suggestions; \"strict\" shows all findings."
    • addedInput schema / properties / scope / description
      Added value: +"\"changed\" reports findings in the changed files only; \"full\" also returns findings from the rest of the repository."
    • changedInput schema / properties / verify / description
      Previous value: -"Configured local verification check IDs to run explicitly."New value: +"IDs of checks configured in repopilot.toml to run on the reviewed revision. They run as local processes. Omit to run nothing."
  3. First observedv0.24.1

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already flag this as non-read-only, destructive and open-world, and the description supplies the reason: a non-empty `verify` array selects local checks that run unsandboxed with host user permissions after one-time form-mode Elicitation consent, with bounded and redacted output, and nothing is uploaded. That is meaningful context beyond the hints. However, it never states what the checks may mutate or delete on disk, which is precisely what destructiveHint=true warns about, so the safety story is incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose, timing and the sibling hand-off are correctly front-loaded, but the middle sentence is a roughly 200-word nested enumeration of every signal category, much of which an output schema already exists to carry. It is organized rather than rambling, yet an agent must wade through the catalogue to reach the important execution-consent caveats at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter tool with nested objects, this is close to complete: default review target, branch mode, signal taxonomy, tiered confidence, the gating flag and the command-execution consent model are all covered, and an output schema exists so return shapes need not be restated. The one real gap is the absence of any statement about what the executed `verify` checks can change on the filesystem, which matters given destructiveHint=true.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage the schema already defines all 15 parameters, so the baseline is 3. The description still adds non-derivable meaning: `base` changes the diff target from working tree to a branch, `verify` is the only switch that runs anything and each entry needs separate approval, and `intent` is metadata that cannot execute commands. Only `filters`, `profile`, `limit`/`offset` and `detail` are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: "Review a Git change locally: what it touched and which checks it weakened." It then explicitly names the sibling it is not ("For a repository health check that is not about one change, use repopilot_scan instead"), so an agent can separate it from repopilot_scan without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete timing ("before finishing work or before a merge"), states the default review target (uncommitted work vs HEAD), explains how to switch to branch review via `base`, and routes the non-change health-check case to repopilot_scan. It also names repopilot_explain_review_signal as the follow-up for interpreting a signal, so the when/when-not/alternative loop is closed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.