Skip to main content
Glama

get_import_graph

Analyze file dependencies by visualizing what imports a file uses and what other files import it, enabling impact analysis and refactoring decisions.

Instructions

Show file-level dependency graph: what a file imports and what imports it (requires reindex for ESM edge resolution)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesRelative file path to analyze (e.g. "src/server.ts")
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses a key behavioral trait (requires reindex for ESM edge resolution), which is crucial for understanding operational constraints. However, it lacks details on output format, error handling, or performance characteristics.

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 a single, efficient sentence that front-loads the core purpose and includes essential operational context without any wasted words, making it easy to parse and understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (dependency analysis with a reindex requirement), no annotations, and no output schema, the description is adequate but incomplete. It covers the purpose and a key constraint but lacks details on what the graph output looks like or how to interpret results.

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 fully documents the single parameter (file_path). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, meeting the baseline for high coverage.

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 clearly states the specific action ('Show file-level dependency graph') and the resource ('what a file imports and what imports it'), distinguishing it from siblings like get_call_graph or get_circular_imports by focusing on import relationships rather than call flows or circularity detection.

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 provides clear context for when to use it (analyzing import dependencies) and includes a prerequisite ('requires reindex for ESM edge resolution'), but does not explicitly state when not to use it or name alternative tools for different types of dependency analysis.

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/nikolai-vysotskyi/trace-mcp'

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