Skip to main content
Glama

get_dependency_diagram

Read-onlyIdempotent

Render dependency diagrams for file or directory paths as Mermaid or DOT. Input a scope to visualize code relationships up to a configurable depth and node limit.

Instructions

Render dependency diagram for a file/directory path as Mermaid or DOT. Input: a path like "src/tools/" — not a question. Trims to max_nodes most important nodes. Read-only. For interactive HTML visualization use visualize_graph instead. Returns JSON: { format, diagram, nodes, edges }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesScope: file path, directory, or "project"
depthNoMax hops from scope (default 2)
max_nodesNoMax nodes in diagram (default 30)
formatNoOutput format (default mermaid)
Behavior5/5

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

Annotations already declare readOnly, destructive, idempotent hints. The description adds that it is read-only and trims to max_nodes most important nodes, which is behavioral context beyond what annotations provide. No contradictions.

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?

Three sentences, no wasted words. First sentence states purpose and outputs. Second sentence clarifies input and trimming. Third sentence clarifies read-only, sibling alternative, and return type. Front-loaded and efficient.

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?

Despite no output schema, the description explicitly states the return object structure (format, diagram, nodes, edges). It covers scope interpretation, trimming, and output format. For a 4-parameter tool with no output schema, this is comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. The description adds semantic context for the 'scope' parameter by specifying input format ('src/tools/') and clarifies that max_nodes limits the diagram size. This adds value beyond the schema descriptions.

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 tool renders dependency diagrams for file/directory paths as Mermaid or DOT. It specifies the input format ('src/tools/' and 'not a question') and distinguishes from the sibling 'visualize_graph' for interactive HTML visualization.

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?

Explicitly states when to use (file/directory path) and when not to ('not a question'). Provides an alternative tool for interactive visualization, and mentions the trimming behavior based on max_nodes parameter.

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