fix_code
Analyze vulnerable code and return before/after patch suggestions with structured edit instructions, line numbers, severity, and confidence so agents can apply fixes; use verify to confirm resolution.
Instructions
Pass vulnerable code as a string and get fix suggestions with before/after patches. Returns structured edit instructions (line numbers, severity, confidence). Use verify_fix afterwards to confirm the fix resolved the issue. Example: fix_code({code: '...', language: 'typescript'})
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": {
"code": "<code>",
"language": "<language>"
},
"name": "fix_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code snippet to analyze and fix | |
| format | No | Output format: json (for agent auto-fix) or markdown (human review) | json |
| language | Yes | Programming language of the code | |
| framework | No | Framework context (e.g. express, nextjs, fastapi, react, django) |