Dependency graph
dependency_graphBuild import and reference graphs across TypeScript/JavaScript, Python, Rust, Go, Java, and Kotlin to reveal module structure and what a subtree depends on.
Instructions
Build the import and reference graph for TypeScript/JavaScript, Python, Rust, Go, Java and Kotlin. format: json, dot or mermaid. Use when: you want module structure or what a subtree depends on. Narrow with relative_path, depth, languages. Avoid when: you need usages of one symbol (symbol_references) or the impact of an edit (change_impact). Output: nodes[], edges[] {from, to, type, confidence}, external[] (top 50), unresolved[] (top 10), stats {externals, unresolved_imports}, limited, truncated. dot and mermaid return data.graph.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "dependency_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | files (imports), symbols (references/extends), or both (default files). | |
| depth | No | Directory recursion cap (default 3, max 10). | |
| format | No | Output format (default json). dot/mermaid return data.graph. | |
| languages | No | Language filter, e.g. ["ts","py","rs","go","java","kotlin"] (default: all supported). | |
| max_edges | No | Max edges kept; more sets truncated (default 2000). | |
| max_nodes | No | Max file nodes (default 500). | |
| include_tests | No | true includes test files/edges (default); false hides them. | |
| relative_path | No | Limit the walk to this subtree (default: the workspace root). | |
| include_external | No | true aggregates npm/pip/node package nodes in external[]. Default false. |