Complexity Trend
complexity_trendTracks file complexity across git history to spot out-of-control growth, spikes from specific commits, and files needing splitting.
Instructions
Track how a file's complexity has changed over time by sampling its state at regular intervals in git history. Identifies files growing out of control, complexity spikes from specific commits, and files that need splitting. NOTE: If the server was not started inside a git repo, you MUST provide repo_path.
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": {
"path": "<path>"
},
"name": "complexity_trend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to look back (default: 180) | |
| path | Yes | File path to analyze (relative to repo root) | |
| samples | No | Number of time samples (default: 10, max: 30) | |
| repo_path | No | Absolute path to the git repository to analyze. Required if Claude Code was not opened in a git repo. |