Skip to main content
Glama

Explain file risk

explain_file_risk
Read-only

Assess a file's standing risk before editing: review commit and bug-fix history, authors, dependents, blast radius, and critical-path status.

Instructions

Show the standing risk profile of one file at HEAD: commit and bug-fix history, number of authors, direct and transitive dependents (blast radius; null when the language is not supported), whether it is on a critical or blocked path, and its top authors. Use it before editing a file you do not know, or to explain a high blast.dependents contribution.

Input Schema

NameRequiredDescriptionDefault
pathYesRepo-relative file path with forward slashes, e.g. src/auth/session.ts.
repoDirYesAbsolute path to the git repository (any directory inside the work tree).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds real behavioral context beyond that: the profile is 'standing' and computed at HEAD (not the working tree), and dependents are 'null when the language is not supported,' which tells the agent to expect a nullable field rather than an error.

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?

Two sentences, front-loaded with the returned profile before the usage advice. Every clause adds information: the field list defines the payload, the parenthetical documents the nullable case, and the second sentence supplies use cases. No filler.

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 no output schema, the description carries the burden of describing returns and does so by enumerating the profile fields, including the null case for unsupported languages. Combined with 100% schema coverage on the two required params and a readOnly annotation, an agent has everything needed to select and call it.

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

Parameters3/5

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

Schema description coverage is 100%: both repoDir (absolute path, any directory inside the work tree) and path (repo-relative with forward slashes, with example) are fully documented in the schema. The description adds no parameter-level detail such as path normalization behavior or error handling, so the baseline 3 applies.

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?

States a specific verb and resource ('Show the standing risk profile of one file at HEAD') and enumerates exactly what the profile contains: commit/bug-fix history, author count, blast radius, critical/blocked path status, top authors. The 'one file at HEAD' scope cleanly separates it from repo-wide siblings like list_hotspots and score_diff, even though no sibling is named.

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?

Gives two concrete triggering conditions: 'before editing a file you do not know' and 'to explain a high blast.dependents contribution.' That is clear when-to-use guidance. It stops short of naming alternatives or stating when not to use it (e.g. repo-wide analysis should use list_hotspots), so it falls just short of a 5.

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