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.
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 |