gdscript_rename
Rename a symbol across all project files, including .tscn and .tres, using zero-based coordinates. Preview changes with gdscript_references before applying.
Instructions
Rename a symbol across all files in the project. Returns: workspace edit with all changes needed. IMPORTANT: Uses ZERO-BASED coordinates. WORKFLOW: (1) gdscript_references to preview impact, (2) gdscript_rename to rename, (3) gdscript_sync_files to refresh LSP state.
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>",
"character": "<character>",
"new_name": "<new_name>"
},
"name": "gdscript_rename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute or relative path to the .gd file | |
| line | Yes | Zero-based line number (editor line - 1) | |
| new_name | Yes | New name for the symbol | |
| old_name | No | Current name of the symbol. Optional but recommended: enables scanning .tscn/.tres files for references Godot cannot see or update. | |
| character | Yes | Zero-based character position |