Skip to main content
Glama

dep_graph

Generate dependency graphs for a file or entire project, revealing nodes, edges, and cycles to guide impact analysis and fix circular imports.

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.

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