Rename Symbol
renameChange the name of a TypeScript/JavaScript symbol and update all references across the project. Provide a file path and the line/offset of any occurrence.
Instructions
Rename a TypeScript/JavaScript symbol (variable, function, class, type, property, etc.) and update all references across the project. Provide the file path and the 1-based line/offset of any occurrence of the symbol.
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>",
"offset": "<offset>",
"newName": "<newName>",
"preview": "<preview>"
},
"name": "rename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path (absolute or relative to cwd) | |
| line | Yes | 1-based line number | |
| offset | Yes | 1-based character offset on the line | |
| newName | Yes | New name for the symbol | |
| preview | Yes | If true, only preview changes |