Get Applicable Refactors
getApplicableRefactorsCheck which refactorings are available at a given code position or selection. Retrieve a list of possible actions with descriptions and reasons why some may not apply.
Instructions
Discover what refactorings are available at a position or selection. Use before attempting a refactor to see what's possible. Returns a list of available refactors with their actions, descriptions, and any reasons why certain actions may not apply.
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>",
"startLine": "<startLine>",
"startOffset": "<startOffset>",
"endLine": "<endLine>",
"endOffset": "<endOffset>"
},
"name": "getApplicableRefactors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path (absolute or relative to cwd) | |
| endLine | Yes | 1-based end line | |
| endOffset | Yes | 1-based end column | |
| startLine | Yes | 1-based start line | |
| startOffset | Yes | 1-based start column | |
| triggerReason | No | Optional trigger reason |