code_actions
Retrieve quick fixes and refactorings for a code position. Passes overlapping diagnostics to include relevant code actions, enabling automated problem resolution.
Instructions
Get available code actions (quick fixes, refactorings) at the given position. Diagnostics overlapping the range are passed to the server so quick fixes are included.
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": {
"file": "<file>",
"line": "<line>",
"col": "<col>"
},
"name": "code_actions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| col | Yes | Column number (1-indexed) | |
| file | Yes | Relative file path from project root | |
| line | Yes | Line number (1-indexed) | |
| endCol | No | End column of range (1-indexed, defaults to col) | |
| endLine | No | End line of range (1-indexed, defaults to line) |