Skip to main content
Glama

Review Gate

review_gate

Gate a code change for merge and return a PASS, WARN, or FAIL verdict for local refs or GitHub PRs, checking policy, secrets, and review rules.

Instructions

Gate a change for merge and return a PASS / WARN / FAIL verdict. Omit pr to run the local, no-GitHub gate against a base ref (changed files, secret safety, risk-sensitive paths, release discipline, validation commands, dependency audit, policy profile). Set pr to gate an open GitHub PR via gh (PR state, review decision, CODEOWNERS approvals, unresolved conversations, branch protection, status checks). Merges the old merge_readiness and pr_merge_readiness tools. Use review_verdict instead when you want the full impact + review + gate composite, or review_context when you want diff/comment context with no verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prNoPR selector (number, URL, or branch). Set, runs the GitHub gate on that PR; omitted or blank, runs the local gate.
baseNoBase ref for the local gate. Defaults to origin/main, then HEAD. Ignored in PR mode.
headNoGate exactly base..head: changed-path, risk, secret, and convergence evidence come from the head commit's tree, so uncommitted and untracked files play no part. Release, validation-command, and optional analyzer checks still inspect the working tree. Cannot be combined with staged. Ignored in GitHub PR mode.
pathNoRepository path. Defaults to current working directory.
policyNoPolicy profile: standard, company, or high-risk. Omitted, the repository's .solumberc.json or user config decides, else standard.
stagedNoUse the exact Git index for changed-path, risk, secret, and convergence evidence. Release, validation-command, and optional analyzer checks still inspect the working tree. May create Git object or index-cache metadata; source files are unchanged. Ignored in GitHub PR mode.
receiptNoOptional convergence inputs hash, JSON object, or path to a JSON receipt artifact. Exact-subject v2 receipts require the full hash; legacy v1 display IDs remain accepted. A receipt bound to a head commit or the staged index verifies only in the same mode (head / staged); a JSON receipt names the mode it needs when they differ.
requestNoOptional change request for context evidence output.
governanceNoGovernance: team or solo. Omitted, the repository's .solumberc.json or user config decides, else team.
minConvergenceNoOptional minimum convergence score (0–100). Enables a failing gate when the task/diff score is below this floor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.5.1
    • changedInput schema / properties / governance / description
      Previous value: -"Governance: team or solo. Omitted, the repository's .otitorc.json or user config decides, else team."New value: +"Governance: team or solo. Omitted, the repository's .solumberc.json or user config decides, else team."
    • changedInput schema / properties / policy / description
      Previous value: -"Policy profile: standard, company, or high-risk. Omitted, the repository's .otitorc.json or user config decides, else standard."New value: +"Policy profile: standard, company, or high-risk. Omitted, the repository's .solumberc.json or user config decides, else standard."
  2. Changed3 schema fields changedv3.2.0
    • changedInput schema / properties / governance / description
      Previous value: -"Governance: team (default) or solo."New value: +"Governance: team or solo. Omitted, the repository's .otitorc.json or user config decides, else team."
    • changedInput schema / properties / policy / description
      Previous value: -"Policy profile: standard (default), company, or high-risk."New value: +"Policy profile: standard, company, or high-risk. Omitted, the repository's .otitorc.json or user config decides, else standard."
    • changedInput schema / properties / pr / description
      Previous value: -"Optional PR selector (number, URL, or branch). When set, runs the GitHub gate; when absent, runs the local gate."New value: +"PR selector (number, URL, or branch). Set, runs the GitHub gate on that PR; omitted or blank, runs the local gate."
  3. Changed2 schema fields changedv1.15.2
    • addedInput schema / properties / head
      Added value: +{
      +  "description": "Gate exactly base..head: changed-path, risk, secret, and convergence evidence come from the head commit's tree, so uncommitted and untracked files play no part. Release, validation-command, and optional analyzer checks still inspect the working tree. Cannot be combined with staged. Ignored in GitHub PR mode.",
      +  "type": "string"
      +}
    • changedInput schema / properties / receipt / description
      Previous value: -"Optional convergence inputs hash, JSON object, or path to a JSON receipt artifact. Exact-subject v2 receipts require the full hash; legacy v1 display IDs remain accepted."New value: +"Optional convergence inputs hash, JSON object, or path to a JSON receipt artifact. Exact-subject v2 receipts require the full hash; legacy v1 display IDs remain accepted. A receipt bound to a head commit or the staged index verifies only in the same mode (head / staged); a JSON receipt names the mode it needs when they differ."
  4. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false, so the description must carry behavioral weight. It usefully describes what each mode inspects and notes the tool merges two prior tools, but it does not disclose mutation side effects, permission/auth needs, or what the verdict contains. The side-effect hint about Git object/index-cache metadata lives only in the schema, not the description.

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

Conciseness4/5

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

Front-loaded with purpose, then modes, then alternatives in three well-ordered sentences. The long parenthetical enumerations of checks are dense but informative; minor legacy-tool reference is the only slightly expendable content.

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 ten-parameter, no-output-schema, mutation-flagged tool, the description covers mode selection and alternatives thoroughly. It leaves return-value detail and mutation/permission behavior to the schema, which is a modest but real gap given the absent output schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all ten parameters in detail. The description reinforces the pr on/off branching but adds no syntax, format, or constraint detail beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb (gate), resource (a change for merge), and the concrete output (PASS/WARN/FAIL verdict). It explicitly separates the two operating modes (omit pr = local gate; set pr = GitHub PR gate) and names the legacy tools it consolidates, so an agent can distinguish it from siblings without opening the 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 explicit routing rules: omit pr for the local gate, set pr for the GitHub PR gate, and names two alternatives with the conditions that select them (review_verdict for the full composite, review_context for diff/comment context with no verdict). Nothing about when-to-use is left to inference.

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