Analyze one source file
analyze_fileAnalyze a JavaScript or TypeScript file to get static complexity metrics and a 0-1 heuristic risk score. Use it before reading code to locate structural risks like nested loops and long functions.
Instructions
Return static complexity metrics and a heuristic risk score (0-1) for a single JavaScript or TypeScript file. Deterministic and fast — no model call. Call this when reviewing a file to find out where the structural risk sits (nested loops, long functions, async boundaries, unguarded mutation) before reading the whole file yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .js/.jsx/.ts/.tsx file |