File hotspots
file_hotspotsRank files by commit count and bug-fix frequency over a selected time window to spot churn, risky areas, and refactoring candidates.
Instructions
Rank files by how many commits changed them in the last N days (merge commits excluded), with how many of those commits were fixes. Pass types: ["fix"] to rank by bug fixes only and find the files that keep breaking. Useful for spotting churn, risky areas and refactoring candidates.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "file_hotspots"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Time window in days. | |
| path | No | Restrict to this file or directory. | |
| repo | No | Repo name or path; defaults to the first configured repo. | |
| limit | No | Maximum number of results. | |
| types | No | Only count commits of these conventional-commit types, e.g. ["fix"]. Commits without a type count as "fix" when their subject mentions fix, bug or hotfix. | |
| exclude | No | Glob patterns for files to leave out, e.g. ["*.lock", "dist/", "docs/**/*.md"]. A pattern without "/" matches at any depth; a trailing "/" excludes a directory. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Name of the repository that was queried. | |
| types | Yes | Commit types counted; null means all commits. | |
| hotspots | Yes | ||
| windowDays | Yes | ||
| filesChanged | Yes | ||
| scanTruncated | Yes | ||
| commitsMatched | Yes | Scanned commits that passed the types filter. | |
| commitsScanned | Yes | ||
| fixesFromKeywords | Yes | Counted fixes that have no conventional-commit header and were recognized by words like "fix" or "bug" in the subject. Non-zero means fix counts are an estimate. |