Skip to main content
Glama

get_change_risk

Read-only

Review a commit, branch range, or uncommitted changes to assess risk, surface newly worsened code health, and identify tests to run.

Instructions

Review a commit, base..head range, or uncommitted work.

Leads with ``directive`` (verdict in ``status``) and ``health_delta``
(what this change newly made worse). ``risk_percentile`` and
``diff_shape`` measure diff size, not danger. ``impacted_tests`` names
the tests to run.

Args:
    revspec: commit or ``base..head``. Omit for uncommitted work, or
        ``HEAD`` when the tree is clean.
    per_commit: with a range, one compact row per commit (up to 30).
    include: ``"findings"``, ``"diagnostics"``, ``"scales"``,
        ``"evidence"``, ``"tests"`` (why each runs).
    finding_id: expand one ``health_delta`` finding.
    extensions: file suffixes to count, e.g. ``[".py"]``.
    exclude_patterns, include_paths: gitignore-style paths to omit, keep
    (include_paths also takes one comma-separated string).
    baseline: commits sampled for the percentile; 0 disables it.
    repo: usually omitted.

Input Schema

NameRequiredDescriptionDefault
repoNo
includeNo
revspecNo
baselineNo
extensionsNo
finding_idNo
per_commitNo
include_pathsNo
exclude_patternsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changedv0.60.1
    • removedInput schema / properties / baseline / title
      Removed value: -"Baseline"
    • removedInput schema / properties / exclude_patterns / default
      Removed value: -null
    • removedInput schema / properties / exclude_patterns / title
      Removed value: -"Exclude Patterns"
    • removedInput schema / properties / extensions / default
      Removed value: -null
    • removedInput schema / properties / extensions / title
      Removed value: -"Extensions"
    • removedInput schema / properties / finding_id / default
      Removed value: -null
    • removedInput schema / properties / finding_id / title
      Removed value: -"Finding Id"
    • removedInput schema / properties / include / default
      Removed value: -null
    • removedInput schema / properties / include / title
      Removed value: -"Include"
    • removedInput schema / properties / include_paths / default
      Removed value: -null
    • removedInput schema / properties / include_paths / title
      Removed value: -"Include Paths"
    • addedInput schema / properties / per_commit
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • removedInput schema / properties / repo / default
      Removed value: -null
    • removedInput schema / properties / repo / title
      Removed value: -"Repo"
    • removedInput schema / properties / revspec / default
      Removed value: -null
    • removedInput schema / properties / revspec / title
      Removed value: -"Revspec"
    • removedInput schema / title
      Removed value: -"get_change_riskArguments"
  2. Changed1 schema field changedv0.55.0
    • addedInput schema / properties / include_paths
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Include Paths"
      +}
  3. Changed2 schema fields changedv0.48.0
    • addedInput schema / properties / finding_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Finding Id"
      +}
    • addedInput schema / properties / include
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Include"
      +}
  4. Changed3 schema fields changedv0.44.0
    • addedInput schema / properties / revspec / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / revspec / default
      Previous value: -"HEAD"New value: +null
    • removedInput schema / properties / revspec / type
      Removed value: -"string"
  5. Addedv0.33.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish a safe read-only, closed-world operation, and the description adds real substance on top: it says the response leads with directive/status and health_delta, that risk_percentile and diff_shape measure diff size rather than danger, and that impacted_tests names tests to run. That clarification of misleading-looking metrics is exactly the kind of context annotations cannot convey; only rate limits or cost would add more.

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?

It is front-loaded with the scope and the key output semantics before a tidy Args list, and nearly every line earns its place. The prose section is slightly dense but not padded.

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?

Given an output schema exists, the description need not enumerate return values, yet it usefully explains the two most easily misread ones and covers all nine parameters with their defaults and formats. An agent has everything needed to call this correctly without opening the schema.

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

Parameters5/5

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

Schema description coverage is 0% across 9 parameters, so the description carries the entire burden, and it documents every one of them in a structured Args block, including defaults (baseline samples with 0 disabling), accepted values for include, and the comma-separated string form of include_paths. This is meaning the schema alone does not provide.

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?

The opening line states a specific verb (review) and resource/scope (a commit, a base..head range, or uncommitted work), which is concrete and actionable. It does not explicitly contrast with the sibling get_risk, so an agent must infer that this tool is change-scoped while get_risk is presumably broader.

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

Usage Guidelines4/5

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

It gives clear context on when to omit revspec (uncommitted work, or HEAD when the tree is clean) and when to set per_commit (with a range). It does not name alternatives such as get_risk or get_health, nor state exclusions, so it stops short of full routing guidance.

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