Skip to main content
Glama

get_risk

Read-only

What history says about touching these files — bug fixes, churn, owners.

Instructions

What history says about touching these files — bug fixes, churn, owners.

Fuses git signals (``hotspot_score``/``owner_pct`` 0-1, trend, bus
factor) with graph reach. ``dependents`` and ``co_change_partners`` are
a floor and correlation, not proof of runtime breakage. Pass
``changed_files`` for PR mode: the response leads with ``directive``
(may_break, missing_cochanges, missing_tests, tests_to_run); read it
first. ``directive.reach`` is never a breakage probability. For a
commit or range use ``get_change_risk``.

Args:
    targets: file paths; defaults to changed_files.
    changed_files: PR-changed files for PR mode.
    include: "graph", "churn", "owners", "scales" (units, calibration),
        "changes"; with changed_files only: "tests" (typed test rows), "blast".
    repo: usually omitted.

Input Schema

NameRequiredDescriptionDefault
repoNo
includeNo
targetsNo
changed_filesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.60.1
    • removedInput schema / properties / changed_files / default
      Removed value: -null
    • removedInput schema / properties / changed_files / title
      Removed value: -"Changed Files"
    • removedInput schema / properties / include / default
      Removed value: -null
    • removedInput schema / properties / include / title
      Removed value: -"Include"
    • removedInput schema / properties / repo / default
      Removed value: -null
    • removedInput schema / properties / repo / title
      Removed value: -"Repo"
    • removedInput schema / properties / targets / default
      Removed value: -null
    • removedInput schema / properties / targets / title
      Removed value: -"Targets"
    • removedInput schema / title
      Removed value: -"get_riskArguments"
  2. Changed5 schema fields changedv0.55.0
    • addedInput schema / properties / targets / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / targets / default
      Added value: +null
    • removedInput schema / properties / targets / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / targets / type
      Removed value: -"array"
    • removedInput schema / required
      Removed value: -[
      -  "targets"
      -]
  3. Changed1 schema field changedv0.48.0
    • addedInput schema / properties / include
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Include"
      +}
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, so the interpretive burden is on the description — and it delivers: dependents/co_change_partners are 'a floor and correlation, not proof of runtime breakage', and directive.reach is 'never a breakage probability'. These are exactly the misinterpretation traps an agent would otherwise fall into.

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?

The punchy first line front-loads the purpose, and the caveats follow in a logical order (signals → caveats → PR mode → alternatives → args). It is dense but not padded, though the docstring-style Args block and reST literals make it read more like source documentation than agent-facing prose.

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?

With an output schema present, the description needn't enumerate return fields, and it wisely spends its words on mode selection, directive field names, and interpretation caveats instead. The only thin spot is default behavior when both targets and changed_files are omitted.

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 0%, so the description must carry all parameter meaning, and it largely does: targets defaults to changed_files, include enumerates valid values ('graph', 'churn', 'owners', 'scales', 'changes') plus mode-gated ones ('tests', 'blast') with brief meanings, and repo is 'usually omitted'. It stops short of stating path format (repo-relative vs. absolute) or what each include value returns in detail.

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 ('What history says about touching these files — bug fixes, churn, owners') plus the git-signal list makes the resource clear: a history-based risk read for a set of files. It explicitly distinguishes itself from the sibling get_change_risk ('For a commit or range use get_change_risk'), though the verb is implied by the name rather than stated outright.

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?

It names the two operating modes (targets-only vs. PR mode via changed_files) and the exact conditions that select them, and routes commit/range lookups to get_change_risk by name. It also tells the agent what to read first in PR mode ('the response leads with directive ... read it first').

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