get_dependencies
Analyze a source file to list its imports and dependencies, revealing which files it relies on. Supports custom scan directories, ignore patterns, and project root for flexible dependency analysis.
Instructions
Returns the list of files that a specific file imports/depends on. Useful for understanding what a file relies on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The file path to analyze | |
| src_dir | No | Source directory to scan | src |
| scan_dirs | No | Optional list of directories to scan (relative to project root unless absolute). Overrides src_dir. | |
| project_root | No | Project root directory (defaults to server cwd if omitted) | |
| ignore_patterns | No | Regex patterns for files to ignore (applied to normalized paths). |