Skip to main content
Glama

get_dependency_graph

Retrieves the file dependency graph, showing import relationships between files to understand module structure and detect circular dependencies.

Instructions

Get the file dependency graph as Mermaid syntax or a list.

Shows which files import which other files, useful for understanding module structure and identifying circular dependencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo"mermaid" (default, Mermaid.js flowchart) or "list"mermaid
file_pathNooptional — show only dependencies involving this file

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses output format and that it shows imports, but does not clarify whether dependencies are direct or transitive, nor what 'involving this file' means for the file_path parameter (both imports and dependents?). No mention of performance, authorization, or side effects.

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?

Two concise sentences that front-load the core purpose and output options. Every word is necessary, with no fluff or repetition.

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?

Given that an output schema exists, the description need not detail return values. It provides useful context about output formats and use cases, though it lacks information about the scope of the graph (all project files vs. selected subset) when file_path is omitted.

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%, and the input schema already provides clear descriptions of both parameters. The tool description adds no additional semantic value beyond what the schema already conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves a file dependency graph as Mermaid or list, and explains it shows imports between files. It distinguishes from siblings like get_call_graph which focuses on function calls, though not explicitly contrasted with get_imports which is similar.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use cases (understanding module structure, identifying circular dependencies) but lacks explicit when-to-use or when-not-to-use guidance. No alternatives are mentioned, leaving the agent to infer context.

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/ThinkyMiner/codeTree'

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