Skip to main content
Glama

gdscript_rename

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
fileYesAbsolute or relative path to the .gd file
lineYesZero-based line number (editor line - 1)
new_nameYesNew name for the symbol
old_nameNoCurrent name of the symbol. Optional but recommended: enables scanning .tscn/.tres files for references Godot cannot see or update.
characterYesZero-based character position
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotation declares readOnlyHint: true, but the tool performs a rename (write operation), creating a contradiction. The description's note about zero-based coordinates is helpful, but the contradiction undermines trust. The description does not disclose this behavioral discrepancy.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured. It starts with the core purpose, then the return type, then an important note about coordinates, and finally a clear workflow. Every sentence serves a purpose without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the annotation contradiction, the description itself is complete. It covers the tool's purpose, coordinate system, workflow, and parameter guidance. No output schema exists, but the return type is mentioned. The description provides sufficient context for correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining that old_name is optional but recommended for scanning reference files that Godot cannot update. This enhances understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Rename a symbol across all files in the project.' It specifies the verb (rename), resource (symbol), and scope (across all files). This distinguishes it from sibling tools like gdscript_references (preview) and gdscript_sync_files (refresh state).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit workflow: (1) gdscript_references to preview, (2) gdscript_rename to rename, (3) gdscript_sync_files to refresh LSP state. It also explains when to use the optional old_name parameter (to scan .tscn/.tres files). This is comprehensive usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pzalutski-pixel/godotlens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server