ai_guard_fix
Apply deterministic AI Guard autofixes to one JS/TS file and return a unified diff; write changes only when apply=true.
Instructions
Apply AI Guard deterministic autofixes to one JS/TS file. Returns a unified diff and writes nothing unless apply=true.
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_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| apply | No | Write the fixes to disk | |
| rules | No | Only apply fixes from these rules | |
| preset | No | agent |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | ||
| file | Yes | ||
| errors | Yes | ||
| status | Yes | ||
| applied | Yes | ||
| changed | Yes | ||
| success | Yes | ||
| remaining | Yes | ||
| fixedCount | Yes | ||
| fixedRules | Yes |