find_hotspots
Identify the most-imported files in your codebase to find critical dependencies and plan refactoring priorities.
Instructions
Find the most-imported files in the codebase (dependency hotspots).
Purpose: Identify files that many other files depend on.
Pagination: Default limit of 200 results per page. Check response.pagination.has_more to fetch more pages.
Sorting: Default order is descending (most imports first). Use sort parameter to change.
Returns: Object with pagination metadata and array of {path, import_count} objects sorted by import count.
Use this when:
Finding critical files
Identifying potential bottlenecks
Understanding architecture
Planning refactoring priorities
IMPORTANT: Only counts static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details.
Example output: {"pagination": {...}, "results": [{"path": "src/models.rs", "import_count": 27}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of hotspots per page (default: 200) | |
| min_dependents | No | Minimum number of dependents to include (default: 2) | |
| offset | No | Pagination offset (skip first N results). Use with limit for pagination. | |
| sort | No | Sort order: 'asc' (least imports first) or 'desc' (most imports first, default) |