import_graph
Trace file-level import dependencies and importers, map directed edges with symbol counts, and follow chains up to three hops to analyze code impact.
Instructions
Returns file-level import dependency graph. Shows what a file imports, what imports it, or both. Returns nodes with symbol counts and directed edges. Follows import chains up to 3 hops deep.
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": {
"file_path": "<file_path>",
"repo": "<repo>"
},
"name": "import_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (as shown in list_repos) | |
| depth | No | Import hops to follow (1-3) | |
| direction | No | Traversal direction | both |
| file_path | Yes | Relative file path within the repository (e.g., 'src/main.py') |