Analyze one source file
analyze_fileGet static complexity metrics and a heuristic risk score (0-1) for a JavaScript/TypeScript file to identify structural risks like nested loops, long functions, or unguarded mutation before reading the file.
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 |