generate-fix
Creates a suggested code fix for a specific Solana/Anchor security finding at a given line using the provided source code and pattern ID.
Instructions
Generate a code fix suggestion for a specific finding at a given line.
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": {
"source_code": "<source_code>",
"pattern_id": "<pattern_id>",
"line_number": "<line_number>"
},
"name": "generate-fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern_id | Yes | Pattern ID to fix (e.g., SOL-C-001) | |
| line_number | Yes | Line number where the finding was detected | |
| source_code | Yes | Full source code |