Cyclomatic complexity per function
analyze_complexityIdentify complex functions in a source file by approximating cyclomatic complexity, sorted worst-first to prioritize refactoring.
Instructions
Approximate cyclomatic complexity (1 + decision points: if/loops/case/catch/&&/||/ternary) per function in a source file, worst first.
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": {
"file": "<file>"
},
"name": "analyze_complexity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | file path | |
| language | No | override language inference |