Skip to main content
Glama

Check Change Risk Before Opening a PR

check_change_risk
Read-onlyIdempotent

Call this BEFORE opening a pull request, with the files you changed. Returns the deploy-risk score (0–100) the PR's Koalr check run will show, the reasons behind it, and toLower: ranked, concrete steps that lower the risk (for example, which files to split into their own PR), each with the score this change would drop to. Also names reviewers who know the code and how risky changes in this repository have gone lately. Get the file list with git diff --numstat <base>...HEAD (plus git diff --numstat for uncommitted work). If the result is medium or higher, take the top toLower step, call this again, and only then open the PR; mention the score and anything you chose not to fix in the PR description. Read-only: nothing about the change is stored.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repository": "<repository>",
      "files": "<files>"
    },
    "name": "check_change_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesEvery file the change touches (up to 300).
titleNoPlanned PR title.
baseBranchNoBranch the PR will target, e.g. "main".
repositoryYesGitHub repository as "owner/name", e.g. "acme/api-service".
authorLoginNoGitHub login of the person you are working for (`gh api user --jq .login`). Adds their history with these files to the score; without it, author expertise is not evaluated.
descriptionNoPlanned PR description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/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, and the description reinforces this with 'nothing about the change is stored', which is useful nuance beyond the hint. It also reveals practical behavior the annotations do not: what determines the score, that `toLower` steps are ranked and quantified, and that the result mirrors the PR's Koalr check run. No auth, rate-limit, or latency details, but none are critical here.

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 the trigger ('Call this BEFORE opening a pull request') followed by return values, input derivation, and the follow-up workflow. Dense and mostly free of padding, though the git command parenthetical and the PR-description instruction make it slightly long for a single tool call.

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

Completeness5/5

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

There is no output schema, and the description compensates fully by naming every meaningful return element: score, reasons, ranked toLower steps with projected scores, reviewer suggestions, and recent repository risk. Combined with the input-derivation guidance and the medium-or-higher escalation rule, an agent has everything needed to call and act on it correctly.

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 description coverage is 100%, so the baseline is 3, and the description earns extra credit by explaining how to produce the `files` payload via `git diff --numstat <base>...HEAD` plus uncommitted work. That operational hint is meaning the schema itself does not carry, though the remaining parameters (title, description, baseBranch, authorLogin) are left entirely to the schema.

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

Purpose4/5

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

States a specific verb and resource ('check the deploy-risk score for the files you changed') and enumerates what comes back: the 0–100 score, the reasons, ranked `toLower` steps with resulting scores, and suggested reviewers. The pre-PR framing helps separate it from post-hoc scoring tools, but it never names a sibling explicitly, so a little differentiation is left to inference.

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 to call it BEFORE opening a PR, prescribes a conditional loop ('if the result is medium or higher, take the top toLower step, call this again'), and says when to stop ('only then open the PR'). It even specifies what to do downstream, mentioning the score and unfixed items in the PR description.

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