calculate_metrics
Analyze TypeScript code quality by calculating cyclomatic complexity and lines of code per function or file. Identify complexity hotspots across a project or in a specific file.
Instructions
Calculate code quality metrics: cyclomatic complexity per function, lines of code per function/file. Identifies complexity hotspots. Omit "file" for project-wide analysis.
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": "calculate_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Path to file (relative to project root). Omit for project-wide analysis. | |
| topN | No | Number of top hotspots to return (default: 20) |