Skip to main content
Glama

get_risk

Assess file risk from git churn, bug-fix history, and dependency topology before editing. For PRs, reveals breakage risk, missing co-changes, and tests to run based on coverage.

Instructions

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

Fuses git temporal signals (churn percentile, trend, bus factor) with
graph topology (dependents, co-changes, impact surface) and security
findings. Consult before editing a file that is bug-fixed or busy. Pass
changed_files for PR mode: the response leads with a directive block
(will_break, missing_cochanges, missing_tests, tests_to_run) — read it
first. tests_to_run is coverage-backed: the tests the per-test map proves
exercise the changed files, empty when no coverage map is ingested.
To score a live commit or ``base..head`` diff by revspec instead of file
paths, use ``get_change_risk``.

defect_profile appears only on files with counted bug fixes: how many landed
in the trailing 6 months, how long ago the last one was, a bug_magnet flag
for sustained recent fix pressure, and top_symbols. Those per-symbol counts
are approximate, because symbol spans are current-tree while each fix's line
ranges are numbered on its own parent commit, so read them as "mostly here"
rather than exact. Nothing here names the commit that introduced a bug.
global_hotspots ranks the same way: fix history first, churn as fallback.

Args:
    targets: file paths to assess.
    repo: usually omitted.
    changed_files: PR-changed files for blast-radius mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
targetsYes
changed_filesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description fully carries behavioral disclosure. It details output structure (directive block, tests_to_run), conditions (defect_profile only on files with counted fixes), approximations (per-symbol counts are approximate), and exclusions (does not name bug-introducing commit). This is rich, honest context.

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 long but every sentence carries value. It is front-loaded with purpose, then usage, then output details, then arg definitions. No filler or repetition—dense but well-organized for the tool's complexity.

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 the tool's complexity (three params, two modes, multiple output fields), the description is remarkably complete. It explains the directive block, tests_to_run's coverage backing, defect_profile's conditions, and hot-spot ranking. An output schema exists but the description still adds necessary caveats and semantics.

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 has no descriptions (coverage 0%), but the Args section explains each parameter: targets (file paths), repo (usually omitted), changed_files (PR-changed files for blast-radius mode). This adds meaningful semantics beyond the schema's raw types.

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

Purpose5/5

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

The description clearly states the tool's purpose: risk assessment for files based on bug fixes, churn, owners, graph topology, and security findings. It explicitly distinguishes itself from the sibling tool get_change_risk (for live commits/diffs), noting the difference in input type (file paths vs revspec).

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 instructs when to use: 'Consult before editing a file that is bug-fixed or busy' and describes PR mode with changed_files. It also points to get_change_risk as an alternative for live commits/diffs, providing clear 'when not to use this tool' guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/repowise-dev/repowise'

If you have feedback or need assistance with the MCP directory API, please join our Discord server