get_churn_metrics
Identify high-risk code hotspots by analyzing file change frequency and cyclomatic complexity from git history. Reports churn concentration to prioritize refactoring.
Instructions
Analyze file change frequency from git history. Shows which files change most often, optionally overlaid with cyclomatic complexity to find high-risk hotspots (frequently changed + complex). Also reports churn concentration (Gini coefficient).
No prior indexing required.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_path": "<repo_path>"
},
"name": "get_churn_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| window_days | No | Days of git history to analyze (1-365, default: 90) | |
| top_n | No | Number of top results (1-100, default: 20) | |
| include_complexity | No | Include churn×complexity composite (default: true) |