ai_guard_scan_file
Scan one workspace JavaScript or TypeScript file for AI-code bugs like floating promises, empty catches, hardcoded secrets, and string-built SQL, returning findings without modifying source.
Instructions
Scan one workspace JS/TS file. Does not modify source.
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": {
"path": "<path>"
},
"name": "ai_guard_scan_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| preset | No | agent | |
| maxIssues | No | Max findings returned, errors first. Totals always count every finding; truncation is reported as RESULT_LIMIT. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clean | Yes | ||
| errors | Yes | ||
| issues | Yes | ||
| preset | Yes | ||
| status | Yes | ||
| success | Yes | ||
| truncated | Yes | ||
| durationMs | Yes | ||
| totalErrors | Yes | ||
| totalIssues | Yes | ||
| filesScanned | Yes | ||
| totalWarnings | Yes | ||
| inlineSuppressions | No |