get_transitive_deps
Find transitive dependencies of any file up to a specified depth. Traverses the full dependency tree, mapping files to their depth, to understand deep coupling and plan refactoring.
Instructions
Get transitive dependencies of a file up to a specified depth.
Purpose: Find not just direct dependencies, but dependencies of dependencies (the full dependency tree).
Returns: Object mapping file IDs to their depth in the dependency tree.
Use this when:
Understanding full dependency chain
Analyzing deep coupling
Planning refactoring impact
IMPORTANT: Only follows static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details.
Example: depth=2 finds: file → deps → deps of deps
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Maximum depth to traverse (default: 3, max recommended: 5) | |
| path | Yes | File path (supports fuzzy matching) |