function_metrics
Measure cyclomatic complexity, body lines, and parameters for each function in a JavaScript/TypeScript project. Filter by minimum complexity or line count to locate complex and lengthy functions.
Instructions
Metrics per function/method: cyclomatic complexity, body lines and parameters. Optional threshold filters.
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": {
"name": "<name>"
},
"name": "function_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name or path of the loaded project | |
| min_lines | No | Show only functions with body >= this number of lines | |
| min_complexity | No | Show only functions with complexity >= this value |