Skip to main content
Glama

Analyze Symbol Modification Blast Radius

analyze_change_impact
Read-onlyIdempotent

Calculates a 0–100 blast radius score and identifies downstream dependents before modifying or deleting a function, class, or module to assess refactoring risk.

Instructions

Calculates change blast radius score (0-100) and identifies downstream dependents before modifying or deleting a target function, class, or module, distinguishing from 'analyze_code_dependencies' and 'audit_code_quality' by calculating targeted refactoring risk scores rather than mapping overall import graphs or profiling code complexity.

Parameters:

  • target_symbol (str, required): Name of the function, class, or method being modified or refactored.

  • project_root (str, optional, default='.'): Root directory of the repository (default: current directory).

  • file_path (str, optional, default=''): Optional file path where the target symbol is defined.

Behavior:

  • Read-only: Scans workspace AST and dependency graphs; does not alter files.

  • Idempotent: Deterministic blast radius scoring for identical repository states.

  • 100% Offline: Local AST caller/callee traversal without remote API calls.

  • Auth & Rate Limits: Zero authentication or API keys required; completes in <300ms.

  • Error Handling: Returns 0 blast radius and not-found notice if the target symbol does not exist in AST index.

Usage Guidelines:

  • When to use: Run prior to editing a core interface, signature, or shared utility to gauge how many downstream files and tests will be impacted.

  • When NOT to use: Do not use for general whole-repository dependency mapping or PageRank centrality (use 'analyze_code_dependencies' instead); do not use for auditing static code complexity and code smells (use 'audit_code_quality' instead).

Returns: Markdown report with quantitative blast radius score (0-100), risk tier (LOW/MEDIUM/HIGH/CRITICAL), affected downstream modules, and test recommendations.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target_symbol": "<target_symbol>"
    },
    "name": "analyze_change_impact"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathNoOptional file path where the target symbol is defined.
project_rootNoRoot directory of the repository (default: current directory)..
target_symbolYesName of the function, class, or method being modified or refactored.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv7.3.2
    • addedInput schema / properties / file_path
      Added value: +{
      +  "default": "",
      +  "description": "Optional file path where the target symbol is defined.",
      +  "title": "File Path",
      +  "type": "string"
      +}
    • changedInput schema / properties / project_root / description
      Previous value: -"Workspace root directory containing target symbols (default: current directory)."New value: +"Root directory of the repository (default: current directory)."
    • changedInput schema / properties / target_symbol / description
      Previous value: -"Name of the function, class, or method to analyze for change blast radius."New value: +"Name of the function, class, or method being modified or refactored."
    • changedInput schema / title
      Previous value: -"_legacy_analyze_change_impactArguments"New value: +"analyze_change_impactArguments"
    • changedOutput schema / title
      Previous value: -"_legacy_analyze_change_impactOutput"New value: +"analyze_change_impactOutput"
  2. Changed5 schema fields changedv7.0.1
    • removedInput schema / properties / file_path
      Removed value: -{
      -  "default": "",
      -  "description": "Optional file path where the target symbol is defined.",
      -  "title": "File Path",
      -  "type": "string"
      -}
    • changedInput schema / properties / project_root / description
      Previous value: -"Root directory of the repository (default: current directory)."New value: +"Workspace root directory containing target symbols (default: current directory)."
    • changedInput schema / properties / target_symbol / description
      Previous value: -"Name of the function, class, or method being modified or refactored."New value: +"Name of the function, class, or method to analyze for change blast radius."
    • changedInput schema / title
      Previous value: -"analyze_change_impactArguments"New value: +"_legacy_analyze_change_impactArguments"
    • changedOutput schema / title
      Previous value: -"analyze_change_impactOutput"New value: +"_legacy_analyze_change_impactOutput"
  3. Changed3 schema fields changedv7.0.0
    • addedInput schema / properties / file_path
      Added value: +{
      +  "default": "",
      +  "description": "Optional file path where the target symbol is defined.",
      +  "title": "File Path",
      +  "type": "string"
      +}
    • changedInput schema / properties / project_root / description
      Previous value: -"Workspace root directory containing target symbols (default: current directory)."New value: +"Root directory of the repository (default: current directory)."
    • changedInput schema / properties / target_symbol / description
      Previous value: -"Name of the function, class, or method to analyze for change blast radius."New value: +"Name of the function, class, or method being modified or refactored."
  4. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / project_root / description
      Added value: +"Workspace root directory containing target symbols (default: current directory)."
    • addedInput schema / properties / target_symbol / description
      Added value: +"Name of the function, class, or method to analyze for change blast radius."
  5. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations that already declare readOnly/idempotent/openWorld=false, the description adds latency (<300ms), the absence of auth or API keys, offline AST traversal, and a concrete failure mode (0 blast radius plus not-found notice when the symbol isn't indexed). This is behavior an agent cannot derive from the structured fields.

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?

Sectioned as Purpose / Parameters / Behavior / Usage Guidelines / Returns, which makes scanning easy and front-loads the purpose, but the opening sentence is a long run-on and the Behavior section repeats read-only and idempotent traits already carried by annotations.

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 3 params, mutation-free semantics, and an output schema present, the definition covers what remains: what the score means, risk tiers, affected modules, and the not-found edge case. An agent could invoke it correctly on the first attempt.

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 baseline is 3, and the 'Parameters' block largely restates the schema text for target_symbol, project_root, and file_path verbatim. It adds no disambiguation, e.g. how file_path interacts with a symbol name that appears in multiple files.

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 names a specific verb and output artifact: 'Calculates change blast radius score (0-100) and identifies downstream dependents' for a function, class, or module. It explicitly distinguishes itself from 'analyze_code_dependencies' and 'audit_code_quality' by contrasting targeted refactoring risk scoring against import-graph mapping and complexity profiling.

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 supplies an explicit 'When to use' trigger (prior to editing a core interface, signature, or shared utility) and a 'When NOT to use' clause that routes each excluded case to a named sibling tool. No inference is required to pick this tool over its alternatives.

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