Skip to main content
Glama

Query impact path (blast radius) of a file

query_impact_path
Read-onlyIdempotent

Trace which files a change affects by scanning reverse import edges, so you can see direct and transitive dependents before editing, renaming or deleting a file.

Instructions

Scan a local repository and report which files would be affected by changing one file: a breadth-first search over reverse import edges. Returns { changedFile, directDependents, transitiveDependents: [{ id, depth }], affectedClusters, blastRadius } where depth 1 means a direct importer, affectedClusters lists the directories touched, and blastRadius counts unique affected files excluding the changed file. Use it before editing, renaming or deleting a file to see who depends on it; use scan_repository_graph when you need the full graph, or generate_architecture_html for a visual. Every call performs its own fresh static scan of path; no prior scan is required. If changedFile is not found, the result is an error that lists the closest matching file ids so you can retry. Static analysis only: dynamic or computed imports and custom path aliases may be missed, and external packages are not tracked.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the repository root to scan, e.g. "/home/me/project" or "C:/dev/project". Relative paths resolve against the MCP server process working directory, which is usually not the project, so prefer absolute paths.
changedFileYesThe file whose callers you want, as a repository-relative path with forward slashes, e.g. "src/core/graph.ts" or "pkg/server/handler.go". An absolute path inside the repository is also accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / changedFile / description
      Added value: +"The file whose callers you want, as a repository-relative path with forward slashes, e.g. \"src/core/graph.ts\" or \"pkg/server/handler.go\". An absolute path inside the repository is also accepted."
    • addedInput schema / properties / path / description
      Added value: +"Absolute path to the repository root to scan, e.g. \"/home/me/project\" or \"C:/dev/project\". Relative paths resolve against the MCP server process working directory, which is usually not the project, so prefer absolute paths."
  2. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description still adds real behavior: each call performs a fresh static scan so no prior scan is needed, missing changedFile yields an error with closest matching ids, and static analysis limits (dynamic/computed imports, aliases, external packages) are disclosed.

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 action and algorithm, then the return shape, then alternatives, then caveats — a sensible ordering with no filler sentences. It is dense and multi-clause, which costs it the top mark, but nothing is redundant given the absent output schema.

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?

No output schema exists, so the description supplies the full return shape including field meanings ('depth 1 means a direct importer', blastRadius excluding the changed file). Combined with the disclosed limitations and error behavior, an agent has everything needed to call it and interpret the result.

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 100%, so the baseline is 3, but the description adds genuine semantics: `path` is rescanned every call (fresh-scan contract) and `changedFile` failure mode returns near-match ids. It does not, however, restate the path-format expectations, which the schema already handles well.

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 ('report which files would be affected by changing one file') plus the algorithm ('breadth-first search over reverse import edges'). The title's 'blast radius' concept is operationalized, so an agent can distinguish this from the two siblings without reading their schemas.

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?

Gives explicit when-to-use ('before editing, renaming or deleting a file') and names both alternatives with their selecting conditions: scan_repository_graph for the full graph, generate_architecture_html for a visual. Exclusions are stated, not inferred.

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