Skip to main content
Glama

Prioritize review for a PR or diff

check_change_risk
Read-only

CALL before merging a pull request or after producing a local diff. Returns a deterministic 0-10 change-shape score with receipts for size, spread, missing tests, sensitive paths, hotspots, and blast radius. Pass repo+pr OR diff; repo may accompany diff for cached hotspot context. This prioritizes review and never approves a merge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prNoPositive pull request number, used with repo.
diffNoRaw unified git diff to score directly.
repoNoowner/repo or a github.com URL.
filesNoPrivacy-preserving changed-file facts; contains no source or diff hunks.
proofsNo
base_shaNo
head_shaNo
contract_idNoOptional short-lived contract_id returned by plan_repo_task.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
agentYes
statusYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / oneOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "pr"
      -      ]
      -    },
      -    "required": [
      -      "diff"
      -    ]
      -  },
      -  {
      -    "not": {
      -      "required": [
      -        "diff"
      -      ]
      -    },
      -    "required": [
      -      "repo",
      -      "pr"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "anyOf": [
      +        {
      +          "required": [
      +            "pr"
      +          ]
      +        },
      +        {
      +          "required": [
      +            "files"
      +          ]
      +        }
      +      ]
      +    },
      +    "required": [
      +      "diff"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "anyOf": [
      +        {
      +          "required": [
      +            "diff"
      +          ]
      +        },
      +        {
      +          "required": [
      +            "files"
      +          ]
      +        }
      +      ]
      +    },
      +    "required": [
      +      "repo",
      +      "pr"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "anyOf": [
      +        {
      +          "required": [
      +            "diff"
      +          ]
      +        },
      +        {
      +          "required": [
      +            "pr"
      +          ]
      +        }
      +      ]
      +    },
      +    "required": [
      +      "files"
      +    ]
      +  }
      +]
    • addedInput schema / properties / base_sha
      Added value: +{
      +  "pattern": "^[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / contract_id
      Added value: +{
      +  "description": "Optional short-lived contract_id returned by plan_repo_task.",
      +  "pattern": "^[a-fA-F0-9]{32}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / files
      Added value: +{
      +  "description": "Privacy-preserving changed-file facts; contains no source or diff hunks.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "additions": {
      +        "maximum": 1000000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "deletions": {
      +        "maximum": 1000000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "line_counts_known": {
      +        "description": "False when Git could not provide text line counts; zeroes are then placeholders, not measured size.",
      +        "type": "boolean"
      +      },
      +      "path": {
      +        "maxLength": 512,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "previousPath": {
      +        "maxLength": 512,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "added",
      +          "modified",
      +          "removed",
      +          "renamed",
      +          "copied",
      +          "changed"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "additions",
      +      "deletions",
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 250,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / head_sha
      Added value: +{
      +  "pattern": "^[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / proofs
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "duration_ms": {
      +        "maximum": 86400000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "obligation_id": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "source": {
      +        "enum": [
      +          "client_reported",
      +          "github_check"
      +        ],
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "passed",
      +          "failed",
      +          "skipped"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "obligation_id",
      +      "status",
      +      "source"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context: output is deterministic, it never approves a merge (limit on its authority), and it notes repo caching for hotspot context. It does not detail receipts format, but with readOnlyHint covering the safety dimension, 4 is generous but warranted.

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?

Three sentences, front-loaded with when to call, the core value (deterministic score with receipts), input modes, and a critical behavioral caveat. Every clause carries information; zero filler.

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?

Output schema exists so return format needn't be detailed. The description covers invocation timing, input-mode disjunction, scoring dimensions, determinism, and non-approval semantics. It doesn't detail the receipt structure or caching behavior, but given the good annotations and output schema, this is adequately complete.

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 63%, and the description fills key gaps: it explains the input-mode semantics (repo+PR OR diff), states repo may accompany diff for cached hotspot context, and notes files array is 'privacy-preserving... contains no source' — clarifying that line counts may be placeholders. This adds meaning beyond the oneOf constraints.

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?

Description clearly states it computes a 'deterministic 0-10 change-shape score' with receipts for specific factors (size, spread, missing tests, sensitive paths, hotspots, blast radius). The verb 'check' plus resources (PR/diff) and the distinct scoring behavior distinguish it from siblings like check_dependency or analyze_repo.

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?

Explicitly says 'CALL before merging a pull request or after producing a local diff', giving concrete timing. It lists valid input combinations ('repo+pr OR diff; repo may accompany diff') and clarifies it 'prioritizes review and never approves a merge', which sets expectations for when it's appropriate vs not.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources