Skip to main content
Glama
SiwarKhalfaoui

codegraph-mcp

Impact analysis — what depends on this file

impact_analysis

Identify all files that depend on a given file, directly or transitively, to reveal the blast radius of a code change.

Instructions

Find every file that transitively depends on a given file, directly or indirectly, up to a depth limit. Answers 'what could break if I change this file' — the main practical use case for an AI agent about to edit code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesRelative file path to analyze
max_depthNoHow many hops to follow (default 5)
graph_pathNoPath to a previously saved graph (default: .codegraph/graph.json)
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explains the traversal semantics (direct or indirect, depth-limited) and the intent, but doesn't disclose whether the operation is read-only, requires a pre-built graph, or any edge-case behavior. This leaves some gaps in behavioral transparency.

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?

The description is two sentences, front-loads the action, and the second sentence adds practical context. No verbosity or unrelated details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description effectively communicates the purpose and main use case for a graph traversal tool. However, it omits the dependency on an existing graph file and doesn't describe the output structure, which are notable for an agent expecting to use the result in an edit workflow. Given the schema is rich, the description is mostly complete but has those gaps.

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?

The input schema has 100% coverage of all three parameters with descriptions, so the description adds little beyond what the schema already provides. The description's mention of 'depth limit' aligns with max_depth, and 'given file' with file_path, but no new parameter-specific semantics are introduced.

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 uses a specific verb ('Find') and resource ('file') and explicitly states the transitive, indirect nature with depth limit. It distinguishes itself from sibling tools like find_callers/find_callees by focusing on transitive dependencies, and ties to a concrete use case ('what could break if I change this file').

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 clearly states the primary use case for an AI agent about to edit code, giving explicit when-to-use context. However, it does not explicitly name alternatives or when not to use it, which limits full differentiation from sibling tools like find_callers or get_file_dependencies.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SiwarKhalfaoui/codegraph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server