prepare_rename
Validate rename feasibility at a code position to avoid failed rename attempts. Returns the targeted range and a placeholder name when supported, or indicates if renaming is not possible.
Instructions
Validate that a rename is possible at the given position before committing to rename_symbol. Returns the range that would be renamed and a placeholder name suggestion, or a message indicating rename is not supported at this position. Use this before rename_symbol to avoid attempting invalid renames. Returns null if the server does not support prepareRename.
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>",
"line": "<line>",
"column": "<column>"
},
"name": "prepare_rename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| column | Yes | ||
| file_path | Yes | ||
| language_id | No |