query_module_dependencies
Map module import/export dependencies across polyglot codebases to reveal inbound referrers, outbound imports, and internal vs external packages before refactoring.
Instructions
Analyzes import/export dependencies, module relationships, and internal vs external package dependencies across polyglot files (Python, TypeScript, Go, Rust, Java, C#, C++).
Behavior:
Read-only: Inspects source syntax trees without modifying or moving files.
Idempotent: Deterministic dependency mapping for any scanned repository.
100% Offline: Local regex and AST parsing; zero external network requests.
Usage Guidelines:
When to use: Run before refactoring, moving, or removing a module to inspect inbound dependents (who imports this) and outbound dependencies (what this imports).
Sibling Routing: For deep recursive function/method call chains (caller -> callee call graph), use 'trace_symbol_call_chain'. To test whether imports violate layer boundary rules, use 'enforce_architecture_boundaries'.
Returns: Markdown report detailing inbound referrers, outbound imports, and the workspace dependency pool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Optional relative or absolute path to a specific file to inspect. If empty, analyzes the whole workspace. | |
| project_root | No | Root directory of the repository to scan (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |