analyze_typescript_complexity
Scores the complexity of a single TypeScript function using tsmetrics-core, returning JSON breakdown to help enforce complexity limits and prevent overly complex code.
Instructions
Scores the complexity of a single TypeScript function with tsmetrics-core. Returns JSON { total, details: [{ startLine, endLine, complexity, description }] }; lines are 1-based within the snippet.
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": {
"code": "<code>"
},
"name": "analyze_typescript_complexity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source of exactly one TypeScript function. |