Dependency graph query
dep_graphReveal a file's imports, its dependents, or a Mermaid diagram of the dependency graph. Use it before refactoring shared modules to see impact.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "dep_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| root | No | mermaid: start file to walk out from (BFS). | |
| depth | No | mermaid: import hops to follow from root (default 2). | |
| scope | No | ||
| target | No |