Skip to main content
Glama

rename_symbol

Rename a code symbol across all workspace files using LSP, generating a preview diff by default and writing changes only when apply is enabled.

Instructions

Rename a symbol across all workspace files via LSP. By default (apply=False), generates and returns a unified preview diff without modifying files. Requires apply=True AND writeChanges enabled in config to actually write changes to disk.

Input Schema

NameRequiredDescriptionDefault
lineYes
applyNo
new_nameYes
characterYes
file_pathYes
symbol_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses that the default is non-writing, that a preview diff is returned, and that actual disk writes require both apply=True and a configuration setting. It does not mention undo behavior or possible conflicts, but the critical safety gating is explicit.

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?

Two compact sentences with no wasted text. The default preview behavior and the write-gating condition are front-loaded and easy to scan.

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?

For a mutation tool with no annotations, the description supplies the key operational context: preview-by-default and the apply/writeChanges gate. An output schema exists to cover return values, though the description could say more about coordinate semantics or undo/conflict behavior.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must explain parameters, but it only covers apply. The required file_path, line, character, and new_name parameters are left to their self-explanatory names, and the optional symbol_name parameter is not mentioned at all.

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

Purpose4/5

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

The description states a specific verb and resource: 'Rename a symbol', with clear scope 'across all workspace files via LSP'. It is easy to distinguish from the read-only sibling tools, though it does not explicitly name those alternatives.

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?

It clearly explains the two usage modes: default apply=False returns a preview diff, while apply=True plus writeChanges enabled actually writes changes. It does not need to mention sibling alternatives because this is the only rename operation, but the when-to-use conditions are well specified.

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