get_cross_module_dependencies
Analyze Python repository structure by building an inter-module import dependency graph. Identifies heavily depended-on modules and outputs a Mermaid diagram.
Instructions
Build an inter-module import graph for a Python repository. Returns module nodes (with file counts and line counts), weighted directed edges, most-depended-on and most-dependent modules, and a Mermaid graph LR diagram.
No prior indexing required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| module_filter | No | Restrict to modules whose label starts with this prefix (e.g. 'core' to scope to the core package) | |
| include_external | No | Include third-party and stdlib imports (default: false) | |
| min_edge_weight | No | Minimum import count for an edge to appear (default: 1) | |
| top_n | No | Limit output to the top N modules sorted by total edge count (default: 20, max: 500) | |
| summary_only | No | Return only stats (module/edge counts) without full lists (default: false) |