Skip to main content
Glama

Dependency graph query

dep_graph

Query the import graph before refactoring to see what a file imports, which files depend on it, or generate a visual diagram with configurable depth.

Instructions

Query the internal import graph. mode=imports: what a file imports. mode=dependents: what imports it. mode=mermaid: a diagram — pass root (+depth, default 2) to walk outward from one file instead of dumping the whole graph, or scope to a path prefix. Run before refactoring a shared module.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
rootNomermaid: start file to walk out from (BFS).
depthNomermaid: import hops to follow from root (default 2).
scopeNo
targetNo
Behavior4/5

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

With no annotations available, the description carries the full burden. It discloses behavioral traits such as the mode-dependent output (imports vs. dependents vs. a mermaid diagram), the default whole-graph dump, and the ability to scope to a path prefix. This is significant behavioral context, though it does not explicitly state that the tool is read-only or describe performance implications.

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 about 70 words, front-loads the purpose, uses a colon-separated mode breakdown, and ends with a practical usage tip. Every sentence adds value with no filler, making it efficient and well-structured.

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?

The tool has moderate complexity (three modes, five parameters, no output schema). The description covers the modes, root/depth/scope, and a use case, but it omits the meaning of 'target' and does not describe the return shape for imports/dependents (only mermaid is said to produce a diagram). This leaves the agent with uncertainty about what the other modes return.

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 description coverage is only 40% (root and depth have descriptions). The description compensates by explaining the meaning of each mode, the behavior of root/depth (including default depth 2), and the scope parameter. However, the 'target' parameter is entirely undocumented in both the schema and the description, leaving a notable gap.

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: 'Query the internal import graph.' It then enumerates the three modes (imports, dependents, mermaid) and clarifies mermaid's behavior, which differentiates it from sibling tools like search_code or find_references. This makes the tool's purpose unambiguous and distinct.

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?

The description explicitly gives a concrete scenario: 'Run before refactoring a shared module.' It also explains when to use mermaid with root/depth versus dumping the whole graph. However, it does not mention alternative tools or provide explicit when-not-to-use guidance, so it lacks exclusions but offers clear 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/Siddhukaushik/slimdex-mcp'

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