rename
Rename a symbol across the project with semantic references. Preview affected files first, then apply to write changes.
Instructions
Rename the symbol at a 0-based position project-wide (semantic — every reference, not a sed). PREVIEW by default (affected file:line); apply=true writes. Use instead of editing call sites by hand.
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": {
"path": "<path>",
"line": "<line>",
"character": "<character>",
"newName": "<newName>"
},
"name": "rename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | 0-based line. | |
| path | Yes | Source file containing the symbol. | |
| apply | No | Write to disk (default false = preview). | |
| backend | No | ||
| newName | Yes | New name. | |
| character | Yes | 0-based column. | |
| maxResults | No | ||
| projectPath | No |