get_code_actions
Retrieve available refactorings, quick fixes, and code modifications for a selected range in a file. Apply actions like adding imports, fixing errors, or implementing interfaces directly.
Instructions
Get code actions for a specific range in a file. Use this tool to obtain available refactorings, quick fixes, and other code modifications that can be applied to a selected code range. Examples include adding imports, fixing errors, or implementing interfaces.
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_path": "<file_path>",
"start_line": "<start_line>",
"start_column": "<start_column>",
"end_line": "<end_line>",
"end_column": "<end_column>"
},
"name": "get_code_actions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | Yes | ||
| file_path | Yes | ||
| end_column | Yes | ||
| start_line | Yes | ||
| language_id | No | ||
| start_column | Yes |