Skip to main content
Glama

rename_symbol

Destructive

Rename a symbol and all its references using a symbol graph, previewing changes first. Scans both graph-confirmed and textual-only sites to catch missed references.

Instructions

Preview-first, graph-driven rename of a symbol and its references (codehelper's heuristic answer to an LSP rename — no language server, no go/types). Resolves the definition via the symbol graph, collects graph-confirmed reference sites, and ALSO runs a word-boundary textual scan to catch references the graph missed, classifying every site as graph-confirmed (high confidence) or textual-only (unverified — may be a same-named field, comment, or string). Returns a per-file plan by default; pass apply=true to write graph-confirmed sites (and include_textual=true to also write textual-only ones). Not type-aware: review before applying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesNew name
lineNoDefinition start line to disambiguate
nameYesCurrent symbol name (or sym: id) to rename
pathNoDefinition file (relative to repo root) to disambiguate when several symbols share the name
repoNoRepository name (optional; defaults to current MCP workspace)
applyNoWrite the edits (default false — preview only)
formatNoResponse text encoding: toon (default) | json
include_textualNoWhen applying, also write textual-only (unverified) sites. Default false.
Behavior4/5

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

The description discloses the internal heuristic (graph-confirmed vs textual-only scanning) and confidence levels, which goes beyond annotations. Annotations indicate destructiveHint=true, and the description confirms this by explaining the apply flag. It also adds context about 'review before applying', enhancing transparency.

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

Conciseness4/5

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

The description is a single paragraph with dense information, front-loaded with the main purpose. Every sentence adds value (purpose, heuristic details, confidence classification, apply behavior, caution). It could be slightly more concise, but it is well-structured and not verbose.

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 8 parameters and no output schema, the description covers key aspects: preview-first behavior, apply flag, confidence levels, disambiguation, and caution. It mentions response format options (toon/json) but not the structure of the plan. It is fairly complete for a complex tool, though error handling or corner cases are not addressed.

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 the semantics of apply and include_textual (default false, preview only) and how to and name, line, path work for disambiguation. It clarifies the meaning of 'textual-only' and 'graph-confirmed', which enriches the parameter 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 clearly states it performs a 'graph-driven rename of a symbol and its references', specifying the action (rename) and resource (symbol). It distinguishes itself from an LSP rename by noting it is heuristic and uses graph + textual scan. This is highly specific and differentiates from siblings, none of which are rename tools.

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?

The description provides clear guidance: it is a 'heuristic answer to an LSP rename', notes it is 'Not type-aware: review before applying', and explains the preview-first behavior with apply and include_textual options. It implicitly advises when to use (when no language server is available) and cautions about review. It could be more explicit about when not to use but is still strong.

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/VeyrForge/codehelper'

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