Skip to main content
Glama

rename_prepare

Check if a symbol at a given file position can be renamed and retrieve its current name. Provides rename feasibility and symbol details for refactoring.

Instructions

Check if a symbol at the given position can be renamed, and get its current name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colYesColumn number (1-indexed)
fileYesRelative file path from project root
lineYesLine number (1-indexed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It transparently indicates this is a non-mutating check ('Check if... can be renamed') and that it retrieves the current name. However, it does not disclose what happens when renaming is not possible, the exact return format, or whether any side effects occur.

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, focused sentence with no filler. The core action ('Check if') is front-loaded, and every word contributes to understanding the tool's purpose.

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

Completeness3/5

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

The description covers the input parameters and the main purpose, but with no output schema and no annotations, it leaves out the return shape or result semantics (e.g., whether it returns a boolean, a name, or an error when renaming is impossible). It is adequate for a simple check tool but has clear gaps.

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?

The input schema covers 100% of the parameters, so the baseline is 3. The description adds minimal parameter meaning beyond 'position' and 'current name', but the schema already documents file, line, and column with clear 1-indexed descriptions.

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 uses a specific verb ('Check if') and resource ('symbol at the given position'), and clearly states the two outcomes: whether the symbol can be renamed and its current name. This distinguishes it from the sibling tool 'rename', which actually performs the rename.

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

Usage Guidelines3/5

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

Usage is implied by the description and name: it is a pre-rename check. However, there is no explicit guidance on when to use it versus 'rename' or 'ts_rename_file', and no alternatives or exclusions are mentioned.

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