get_dependencies_with_depth
Retrieve file dependencies up to a chosen depth in the import graph, either downstream imports or upstream importers, and return each file with its distance from the target.
Instructions
Gets file dependencies up to specified depth in the import graph.
Args:
file_path: File path relative to project root
depth: How many levels deep to traverse (1-5, default 2)
direction: "downstream" (what it imports) or "upstream" (what imports it)
Returns:
List of files with their distance from the target file
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>"
},
"name": "get_dependencies_with_depth"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| direction | No | downstream | |
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |