Predict the most likely runtime failure in a file
predict_failuresIdentify likely runtime failures in JavaScript and TypeScript by combining static analysis with an independent model review that returns line numbers and reasons.
Instructions
Combine static analysis with a second-opinion verdict from the signed-in Claude Code, Codex, or GitHub Copilot CLI, returning the most likely runtime failure with a line number and reason. status distinguishes actionable, uncertain, no-finding, and unavailable results. checked lists the bug categories the model reports having considered, so a clean file weighed against the whole catalogue is distinguishable from one where it stopped early; it is a self-report, and an empty list means no coverage was reported. Pass multi: true to get every finding the model can demonstrate, ranked, in a findings array instead of one verdict — experimental, and more findings per call is also more surface for false positives per call. actionable applies the measured score >= 0.7 precision gate. uncertain names a candidate the reviewer could not confirm: read its cited lines before dismissing it, and report it only if you confirm it yourself. This spawns another model and takes 5-15 seconds, so only call it when you specifically want an independent second opinion. If you are yourself reviewing the code, use analyze_file and read the source instead. Reviewing several files? Pass them all as files in one call rather than calling once per file: small files share bounded model calls to reduce repeated CLI context. Groups run concurrently, with individual verdicts and explicit failures.
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": "predict_failures"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Absolute path to a .js/.jsx/.ts/.tsx file | |
| files | No | Absolute paths to review in one call. Small files share bounded model calls, reducing repeated CLI context; large files run alone. Replies carry a `results` array in the order given. Supersedes `file`. At most 100; only JavaScript/TypeScript source is sent to the model. | |
| model | No | Model override passed to the CLI | |
| multi | No | Return every finding the model can demonstrate, ranked by score, rather than the single most likely one (default false). Experimental: the precision gate was measured on one-finding replies, so `actionable` is less well characterised here. | |
| logFile | No | Optional log file to fold into the combined score | |
| verbose | No | Include the static metric counts and the full log breakdown (default false) | |
| provider | No | Which CLI to ask (default: whichever is installed) | |
| concurrency | No | Model calls in flight at once (default 4), each covering up to eight files. Lower it if the provider starts rate-limiting. | |
| calleeContext | No | Also send bounded imported definitions and referenced type contracts so the model can check dependency behavior (default true). Turning this off reduces input tokens but removes that evidence. |