Map a file's dependency neighborhood
map_dependenciesFind a file's local imports, reverse imports, and related tests in JavaScript/TypeScript to reveal static dependency chains with line-level evidence.
Instructions
Find a file's local imports, reverse imports and tests connected by imports. Each relationship includes a source path and line as evidence. Static file relationships, not runtime callers or test coverage. Scans JavaScript/TypeScript including tests, with bounded work and explicit unresolved imports and scan limits. Deterministic; no provider call.
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": {
"directory": "<directory>",
"file": "<file>"
},
"name": "map_dependencies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Source file, absolute or relative to directory | |
| depth | No | Import hops in each direction, default 1 | |
| limit | No | Total neighboring files to return, default 50 | |
| maxFiles | No | Maximum source files to discover, default 1000 | |
| directory | Yes | Project directory; source outside this directory is excluded |