Skip to main content
Glama

dep_graph

Map import dependencies (transitive up to 10 levels) or entire project graph to detect cycles and assess change impact.

Instructions

Import dependency graph of a file (transitive N levels) or the whole project (scope=project → nodes/edges/cycles). Circular deps? fix_imports. Changing a dep? impact_analysis first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoFile path relative to workspace_dir (e.g. "scripts/lib/tools/spawn.mjs"). Omit or use scope=project for whole-project graph.
depthNoTransitive depth (default 3, max 10). File mode only.
scopeNoB13: scope=project → whole-project module graph {nodes, edges, cycles}. Mutually exclusive with file.
workspace_dirYesREQUIRED: project root (abs). reindex first if new.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It implies a read-only operation via 'import' and describes output for project mode, but it does not explicitly state read-only status, side effects, or prerequisites like reindexing. This leaves some ambiguity.

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, information-dense sentences that front-load the primary purpose and immediately provide alternative tool pointers. No wasted words; every phrase earns its place.

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 covers the main use cases, project output structure, and alternative tools. It omits file-mode output specifics, but given the schema's completeness, this is sufficient. The complexity level is moderate and well-addressed.

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 baseline is 3. The description largely restates schema information (file, depth, scope) without adding new semantics. It clarifies the two modes, but that is already present in the schema.

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's function: generating an import dependency graph. It specifically distinguishes between file-level (transitive N levels) and project-level (nodes/edges/cycles) use cases, making it distinct from sibling tools like fix_imports and impact_analysis.

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?

Explicit usage guidance is provided: 'Circular deps? fix_imports. Changing a dep? impact_analysis first.' This tells the user when not to use this tool and points to specific alternatives, which is excellent contextual guidance.

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

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/wulun811/LiuHe'

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