Skip to main content
Glama

Rename symbol

ide_rename
Destructive

Rename a symbol at a specific file location and automatically update all references across the project. Use it to refactor code safely without manual edits.

Instructions

Rename the symbol at path:line:column and update all references, like Shift+F6 (classes also rename their file). Saves all files afterwards. If the IDE detects conflicts it shows a dialog in Studio and this call times out; resolve it there.

Input Schema

NameRequiredDescriptionDefault
lineYes
pathYesAbsolute file path
columnNoColumn of the symbol's name (a declaration or a reference to it)
newNameYes
projectNoOpen project name or base path. Defaults to the project containing `path`, else the active one.
searchInCommentsNo
searchTextOccurrencesNoAlso rename plain-text occurrences in non-code files

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond destructiveHint=true: it discloses that all references are rewritten, that classes also get their file renamed, that all files are saved afterwards, and that conflicts surface as a Studio dialog causing a timeout that the agent cannot resolve programmatically. That timeout/dialog behavior is a critical, non-obvious trait an agent must know before calling.

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?

Three dense sentences, zero filler: operation and scope first, then the file-saving side effect, then the failure mode. Every sentence carries information an agent needs.

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

Completeness4/5

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

No output schema, and the description covers the mutation's side effects, save behavior, and the timeout/dialog hazard, which is the main completeness risk. The gap is the unmentioned scope-widening boolean flags and their implication for how carefully the agent should choose line/column; minor but real for a destructive tool.

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

Parameters3/5

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

With 57% schema coverage, the description adds the key insight that line/column address a symbol name at a declaration or reference site, but it says nothing about the optional behavioral parameters searchInComments and searchTextOccurrences, which materially widen the blast radius, nor about the project default. Baseline-plus rather than full compensation.

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?

States a specific verb ('Rename') and resource ('the symbol at path:line:column') plus the scope of the operation ('update all references') and an unusual extra ('classes also rename their file'). The Shift+F6 analogy makes the exact IDE operation unambiguous and separates it from siblings like ide_find_usages or ide_action.

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

Usage Guidelines4/5

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

Clear context for use (position-addressed symbol rename with reference updates) and explicit failure guidance: if the IDE finds conflicts, a Studio dialog appears and this call times out, so resolve there. It does not explicitly name an alternative tool (e.g. ide_find_usages first, or ide_action), so it stops short of full when/when-not routing.

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