Skip to main content
Glama

rename

Renames a symbol across all affected files, returning a workspace edit or applying changes directly to disk when requested.

Instructions

Rename a symbol across all affected files. Returns the workspace edit, or applies it to disk when apply is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colYesColumn number (1-indexed)
fileYesRelative file path from project root
lineYesLine number (1-indexed)
applyNoWrite the changes to disk instead of returning the edit (default false)
newNameYesThe new name for the symbol

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description must carry the burden of behavioral disclosure. It does disclose key behavior: the tool either returns a workspace edit or applies it to disk depending on the 'apply' flag. It also states the scope ('all affected files'). However, it does not mention potential side effects like file modification when 'apply' is true, nor does it address error handling or conflicts. Still, the dual return/apply behavior is clearly stated, which is a significant disclosure.

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 a single, front-loaded sentence that immediately states the primary action and scope, followed by a clear explanation of the apply behavior. There is no redundant information, and every word contributes to clarity. It is highly concise and well-structured.

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?

Given the tool's complexity (renaming across files) and the absence of an output schema, the description adequately explains the return value behavior (workspace edit vs. disk application). It does not mention prerequisites like ensuring the symbol exists or the file is open, nor does it address error scenarios, but these are not critical for invoking the tool. The description is sufficiently complete for an agent to call it correctly.

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?

Schema coverage is 100%, so all five parameters (file, line, col, newName, apply) are already documented in the input schema. The description adds no additional parameter-specific meaning; it only restates the apply behavior that is already in the schema. Since the schema covers all parameters, a baseline score of 3 is appropriate.

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 the action (rename), the resource (a symbol across all affected files), and the scope (multiple files). It differentiates from sibling tools like rename_prepare (which likely only prepares the rename) and ts_rename_file (which renames a file) by focusing on symbol renaming. The phrase 'across all affected files' is specific and unambiguous.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives like rename_prepare or ts_rename_file. It does not mention conditions under which the tool should be preferred, nor does it exclude scenarios. The 'apply' flag is described, but the tool itself is positioned as a general symbol rename, leaving the agent to infer when to use it.

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