Skip to main content
Glama

get_change_risk

Review a commit, commit range, or uncommitted changes to assess change risk, health impact, findings, and test coverage.

Instructions

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

Leads with ``directive`` (what to do) and ``health_delta`` (what this
change newly made worse). Findings are reported only when the diff explains
them, name their ``attribution`` basis, and sort change-written above
pre-existing.

Trust ``health_delta.status``: ``partial`` means files were skipped and the
change is not cleared.

``impacted_tests`` keeps measured coverage and inferred candidates distinct.
``patch_coverage`` is the share of changed executable lines stored coverage
ran; ``hints`` name tests to extend. ``fix_history`` is the changed files'
bug-fix record, ``overlap`` the past fixes on these exact lines,
``branch_overlap`` other branches editing them. ``diff_shape`` is one line
on size, not a danger verdict. An empty diff returns
``status: "nothing_to_score"``.

Args:
    revspec: Commit or ``base..head`` range. Omit to review uncommitted
        work, or ``HEAD`` when the tree is clean.
    repo: Repository alias in workspace mode; omit for the default.
    extensions: File suffixes to count, e.g. ``[".py", ".ts"]``.
    exclude_patterns: Gitignore-style paths to omit, e.g. ``["tests/"]``.
    include_paths: Gitignore-style paths to keep, as a list or one
        comma-separated string, e.g. ``"src/api/,src/db/"``. Omit for all.
    baseline: Recent commits sampled for percentile ranking; 0 disables it.
    include: ``"findings"``, ``"diagnostics"`` (raw score mechanics) or
        ``"scales"`` (units).
    finding_id: Expand one ``health_delta`` finding by its id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
includeNo
revspecNo
baselineNo
extensionsNo
finding_idNo
include_pathsNo
exclude_patternsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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"
      +}
  3. 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"
  4. Addedv0.33.0

TDQS

A4.1/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 so well: findings are only reported when the diff explains them, name their attribution basis, and sort change-written above pre-existing. It also flags the partial status caveat and the nothing_to_score edge case. Missing are operational traits like cost, permissions, or read-vs-write nature.

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 core purpose and the directive/health_delta lead, and the Args section is tightly formatted. It is dense and slightly long, and some output-field explanation overlaps with the existing output schema, but every sentence carries information.

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?

For an 8-parameter, zero-schema-coverage tool with no annotations, the description covers purpose, review scope, key output semantics, edge cases, and every argument. Nothing essential to calling it correctly is missing.

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%, so the description must compensate, and it does: the Args block documents all 8 parameters with formats and examples (e.g. revspec as 'base..head', include_paths as a comma-separated string, baseline semantics and that 0 disables it, include accepting findings/diagnostics/scales). This adds real meaning beyond the bare 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 — 'Review a commit, base..head range, or uncommitted work' — so an agent immediately knows it is a change-scoped risk review. It does not, however, distinguish itself from close siblings like get_risk or get_health, leaving the agent to infer the boundary.

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

Usage Guidelines3/5

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

Some usage context is present: omitting revspec reviews uncommitted work, and an empty diff yields nothing_to_score. But there is no explicit when-to-use/when-not guidance relative to get_risk or get_health, so the routing decision is left implied.

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