rename_symbol
Rename a symbol in your codebase with AST-level safety, updating all references and returning a unified diff for review or direct application.
Instructions
Applies syntactically safe, AST-level renames across all consumers and returns unified diffs.
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": {
"oldName": "<oldName>",
"newName": "<newName>",
"targetFile": "<targetFile>"
},
"name": "rename_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | Optional line number to disambiguate if multiple symbols share the name. | |
| dryRun | No | If true, returns the unified diff preview without modifying files on disk. | |
| newName | Yes | New name for the symbol. | |
| oldName | Yes | Current name of the symbol to rename. | |
| targetFile | Yes | File path containing the symbol declaration or reference. | |
| workspaceRoot | No | Optional workspace root directory. |