get_dependency_graph
Returns the direct import graph for a file, showing both its dependencies and dependents to identify what the file imports and what imports it.
Instructions
Returns the direct import graph for a specific file: what it imports, and what imports it. Use to answer: what depends on this file? What does this file depend on?
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": {
"project_root": "<project_root>",
"file_path": "<file_path>"
},
"name": "get_dependency_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format — json (default) or mermaid flowchart diagram | json |
| file_path | Yes | Path to the file (absolute or relative to project_root) | |
| project_root | Yes | Absolute path to the TypeScript project root (must contain tsconfig.json) |