Skip to main content
Glama

analyze_impact

Read-onlyIdempotent

Lists files affected by a change, grouped by dependency depth with reasons and files to read first, to assess blast radius before editing.

Instructions

Lists what a change to one file reaches: the files that depend on it, grouped by depth, each with the reason it is on the list, then the files to read first. Use it before editing a file. For one function or type use find_usages; for the bare import tree of a module use list_dependencies. Input: target for one file, or targets for several in one call; each is a path relative to the repository root or a module ID, and depth is how many hops to follow (2 by default). Output: S-expression lines; with targets, one answer per file in the order given, after one line that says when the graph was built and how many changed files it misses. The list is complete: it never stops at 200 items, with or without all. It only reads the graph and changes nothing. A name the graph does not hold is answered with an error line, with suggestions when similar names exist.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_impact"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoAccepted for callers written for earlier versions; the answer lists every dependent either way.
depthNoHow many hops to follow.
targetNoFile path relative to the repository root, or a module ID.
targetsNoSeveral file paths or module IDs; one answer each, in this order, after a fact that says when the graph was built and how many changed files it misses.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, yet the description adds genuinely new behavioral facts: the result is never truncated at 200 items regardless of `all`, unknown names produce an error line with similar-name suggestions rather than an empty result, and the `targets` response is preceded by a line stating graph build time and how many changed files the graph misses. These are exactly the caveats an agent needs and none are derivable from the annotations.

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 description is front-loaded with purpose, then usage, then input, output and caveats — a clean and predictable order. It is dense rather than padded, though a few clauses restate schema facts (depth default, target path form) that could be trimmed without loss.

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?

There is no output schema, so the description carries the return-value burden and does: it names the S-expression line format, the per-target ordering, the leading graph-staleness line, and the error shape. Combined with the explicit no-op `all` semantics and the read-only guarantee, nothing material an agent needs to call this correctly is missing.

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%, so the schema already documents target, targets, depth and all, including depth's default of 2 and the compatibility nature of `all`. The description largely restates those facts at prose level ('depth is how many hops to follow (2 by default)', 'a path relative to the repository root or a module ID'), adding little semantic detail the schema does not already carry — notably it does not explain edge cases like depth=0 or how depth interacts with grouping. Baseline 3 is appropriate.

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 opening clause names a specific verb and resource ('Lists what a change to one file reaches') and immediately scopes the output ('files that depend on it, grouped by depth, each with the reason'). It then distinguishes itself from two named siblings (find_usages for a function/type, list_dependencies for the bare import tree), so an agent can route correctly without opening any schema.

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?

'Use it before editing a file' gives an explicit trigger, and the two explicit alternatives with their selecting conditions ('for one function or type', 'for the bare import tree') make the exclusion set concrete rather than inferred. The target-single vs targets-multiple choice is also spelled out as a usage decision.

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