get_hotspots
Rank functions across a repository by complexity, parameter count, line length, or nesting depth to identify top hotspots for refactoring prioritization.
Instructions
Rank functions across an entire repository by a chosen complexity metric (cyclomatic complexity, parameter count, line length, or nesting depth). Returns top-N hotspots with full detail breakdown. Useful for prioritising refactoring efforts.
No prior indexing required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| metric | No | Metric to rank by: 'complexity' (cyclomatic), 'params' (parameter count), 'length' (line count), 'nesting' (nesting depth). Default: complexity. | |
| top_n | No | Number of top results to return (1-100, default: 20) | |
| min_threshold | No | Minimum metric value to include (optional) | |
| exclude_tests | No | Exclude test files (default: true) | |
| summary_only | No | Return only stats without individual hotspot details (default: false) |