Skip to main content
Glama

get_change_risk

Identify risk in code changes by reviewing a commit, diff range, or uncommitted work. Get actionable findings on health impact, affected tests, and prior fixes to decide whether a change is safe.

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). A finding is reported only when the diff explains
it, and each names its ``attribution`` basis; findings the change wrote
sort above pre-existing ones it only touched.

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

``impacted_tests`` keeps measured coverage and inferred candidates distinct.
``fix_history`` is the changed files' bug-fix record, ``overlap`` the past
fixes on these exact lines. ``branch_overlap`` names other branches editing
them. ``diff_shape`` is one line on size, not a danger verdict. An empty
diff returns ``status: "nothing_to_score"`` and names the tree it read.

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/"]``.
    baseline: Recent commits sampled for percentile ranking; 0 disables it.
    include: ``"findings"`` for every change finding, ``"diagnostics"`` for
        raw score mechanics, ``"scales"`` for units. All identical on
        repeat, so ask once.
    finding_id: Expand one ``health_delta`` finding by its id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
includeNo
revspecNo
baselineNo
extensionsNo
finding_idNo
exclude_patternsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.6/5.0
Behavior5/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 exceptionally. It exposes important behavioral nuances: 'partial means files were skipped and the change is not cleared,' findings are 'reported only when the diff explains it,' and 'diff_shape is one line on size, not a danger verdict.' This prevents misinterpretation and gives the agent actionable caution.

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?

The description is dense but well organized: a one-line scope summary, a short output-semantics section, and a clear Args list. Every sentence adds operational value, and the most important behavioral warnings are front-loaded.

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 seven parameters, zero schema descriptions, and no annotations, this description is remarkably complete. It explains output fields, edge cases like empty diffs, and parameter interactions. The output schema fills in formal return types, so no critical invocation information 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%, but the description fully compensates by explaining every parameter in meaningful terms. It gives concrete examples for extensions and exclude_patterns, clarifies revspec modes, defines baseline behavior, and explains include values and repeat-call stability.

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 description opens with a specific verb and resource: 'Review a commit, base..head range, or uncommitted work.' It clearly distinguishes this tool's scope from generic health/overview tools. However, it does not explicitly differentiate from the sibling 'get_risk', despite the similar names.

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?

The description provides clear usage context for the main modes: 'Omit to review uncommitted work, or HEAD when the tree is clean.' It also gives parameter-level guidance such as '0 disables' baseline and explains include modes. It does not name alternatives or state when not to use this tool in favor of a sibling.

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