Skip to main content
Glama

Gate completion: review a patch and verify claims

jev_gate

Review a proposed patch and verify completion claims against supplied evidence, auto-accepting only when review and claims meet thresholds. Escalates unsupported or contradictory claims.

Instructions

Review a proposed patch and verify completion claims against supplied evidence in one TypeSafe Jev call. Auto only when the patch review is accepted and every claim is verified at or above auto_accept. Unsupported claims require review; confident contradictions, unknown confidence, or low confidence escalate. The request and claims are assertions to check, never proof; put supporting diff excerpts and test logs in evidence. Evidence is capped at 16 items and 200,000 characters in aggregate. Does not run tests or apply changes. Use jev_review for a patch without claims, jev_verify for claims without a patch review.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffNoProposed patch, file excerpt, or change summary (whole-change review). Truncated at 50000 chars. Provide exactly one of diff or files.
filesNoPer-file review: one { path, diff } per file. The rubric is asked once per file, all in one request; the whole change is auto only when every file is auto, and the review names the limiting file and rubric. Each diff is truncated at 50000 chars; up to 16 files, and request + tests + all diffs together must stay within 200,000 chars. Provide exactly one of diff or files.
testsNoReported test output for the patch review. Truncated at the same cap.
claimsYesCompletion claims to check against evidence, each truncated at 2000 chars. Up to 16 per call.
requestYesWhat the user asked for; this is not evidence of completion.
evidenceYes
review_atNoScore, safe_to_apply, or per-claim confidence below this escalates. Must be <= auto_accept. Default min(0.5, auto_accept).
auto_acceptNoReview and per-claim confidence at or above this may stand automatically. Default 0.8.
composite_floorNoWeighted composite at or above this is required for auto. Default 0.7.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.12.0
    • changedInput schema / properties / diff / description
      Previous value: -"Proposed patch, file excerpt, or change summary. Truncated at 50000 chars."New value: +"Proposed patch, file excerpt, or change summary (whole-change review). Truncated at 50000 chars. Provide exactly one of diff or files."
    • addedInput schema / properties / files
      Added value: +{
      +  "description": "Per-file review: one { path, diff } per file. The rubric is asked once per file, all in one request; the whole change is auto only when every file is auto, and the review names the limiting file and rubric. Each diff is truncated at 50000 chars; up to 16 files, and request + tests + all diffs together must stay within 200,000 chars. Provide exactly one of diff or files.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "diff": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "path": {
      +        "maxLength": 500,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "diff"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 16,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "request",
      -  "diff",
      -  "claims",
      -  "evidence"
      -]New value: +[
      +  "request",
      +  "claims",
      +  "evidence"
      +]
  2. Changed1 schema field changedv0.10.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Addedv0.5.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it defines the auto/review/escalate decision logic, states evidence is capped at 16 items and 200,000 characters, warns that request and claims are assertions never proof, and clarifies it neither runs tests nor applies changes. It stops short of describing the response payload (scores, per-claim verdicts), which matters since there is no output schema.

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

Conciseness5/5

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

Roughly five dense sentences, all front-loaded with the core action, then decision rules, then constraints, then sibling routing. No filler and every sentence carries operational information.

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 9-parameter tool with 89% schema coverage and no output schema, the definition covers behavior, escalation thresholds, evidence limits, exclusions, and alternatives. The one notable gap is what a successful call returns, which an agent may need in order to interpret results.

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?

Schema coverage is 89%, so the schema does most of the work (baseline 3). The description still adds real value by advising that supporting diff excerpts and test logs belong in evidence, plus the aggregate evidence cap, which goes beyond the per-field schema text.

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 compound verb (review a patch / verify claims) plus the resource (patch + evidence) and scopes it as one combined call. It explicitly distinguishes itself from jev_review (patch, no claims) and jev_verify (claims, no patch), so an agent can route correctly without opening schemas.

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 when-to-use and when-not-to-use guidance: use jev_review for a patch without claims, jev_verify for claims without a patch review. It also names the decision conditions (auto only when review accepted and all claims verified at/above auto_accept) and the escalation triggers (contradictions, unknown or low confidence).

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