Dependency graph
project_dependency_graphBuild import and reference graphs for TypeScript, JavaScript, Python, Rust, Go, Java, and Kotlin to inspect module structure and subtree dependencies in JSON, DOT, or Mermaid.
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 (project_symbol_references) or the impact of an edit (project_change_impact). Output: nodes[], edges[] {from, to, type, confidence}, external[], unresolved[], stats, 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": "project_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 | 1 includes test files/edges (default); 0 hides them. | |
| relative_path | No | Limit the walk to this subtree (default: the workspace root). | |
| include_external | No | 1 aggregates npm/pip/node package nodes in external[]. Default 0. |