Skip to main content
Glama

code_impact

Read-onlyIdempotent

Analyze which functions and types call or inherit a changed symbol, up to a chosen depth, and list affected files and tests to assess refactor risk.

Instructions

What a change to a symbol could affect: the functions and types that call or inherit it, directly or through others, up to depth hops, with the files that hold them and which of those are tests. For a type, what uses its members counts too. Only links the code index resolved are followed; a call it could not resolve is missed, so check code_references for the full list of mentions.

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": {
      "containerId": "<containerId>",
      "symbol": "<symbol>"
    },
    "name": "code_impact"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoHops to follow (1-3). Default 2
limitNoAt most this many symbols and files (1-200). Default 30
symbolYesThe symbol, e.g. "Ledger.Post"
containerIdYesContainer or source ID or name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safe-read profile (readOnlyHint, idempotentHint), and the description adds genuinely new behavioral facts: only index-resolved links are followed, unresolved calls are silently absent, and for types the usage of members is included. The disclosure of a known incompleteness in results is exactly the kind of context an agent needs to interpret output correctly.

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?

Two sentences, front-loaded with the outcome and then the caveat, with no filler. It is dense—several clauses are packed into the first sentence—but each clause contributes distinct information about scope or result shape.

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 must describe returns, and it does: affected functions and types, their files, and which are tests. Combined with the stated resolution limitation and the pointer to code_references, an agent has enough to call it and interpret the answer.

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 coverage is 100%, so depth, limit, symbol, and containerId are already documented with defaults and ranges. The description reinforces that depth is a hop count and that results include files, but it adds no format examples or edge-case behavior (e.g. what happens when depth exceeds 3 or when limit truncates). Baseline 3 is appropriate when the schema carries the parameter burden.

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 opens with a specific verb-and-resource framing ('What a change to a symbol could affect') and enumerates the exact result content: callers, inheritors, transitive hops, holding files, and test classification. It is clearly distinguishable from code_references, which it names as the mention-listing alternative.

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?

It gives an explicit routing rule for the closest sibling: use code_references when you need the full list of mentions, because unresolved calls are missed here. That is a real when-to-use-this-vs-that statement, though it doesn't state a precondition such as running it before a refactor or that the container must be indexed.

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