Skip to main content
Glama
florpan
by florpan

rename_symbol

Rename a symbol across the codebase using compiler-grade analysis, targeting only true references while ignoring unrelated same-named symbols. Preview changes before applying.

Instructions

Rename a symbol everywhere, using the compiler's own understanding rather than text replacement — so it renames the right things and leaves unrelated same-named symbols alone. Defaults to a dry run showing what would change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCurrent symbol name
applyNoWrite the changes. Omit or false to preview only.
new_nameYesNew name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description must disclose behavioral traits, and it does disclose the most critical one: 'Defaults to a dry run showing what would change.' This tells the agent that by default no mutation occurs and that apply=true is required to write changes. It also explains the semantic behavior (renames only the right symbols). However, it does not disclose potential side effects of applying (e.g., whether changes are reversible, file scope, or confirmation requirements), which would be expected for a mutation tool with zero annotation coverage.

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 two sentences with zero fluff. The core purpose is front-loaded in the first sentence, and the critical dry-run default is stated immediately after. Every clause earns its place; there is no redundant information. The structure leads with what the tool does, then clarifies its safety behavior.

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 tool of this complexity, the description covers the essential context: purpose, semantic accuracy, and default preview behavior. It does not explain what happens when apply is true (beyond the schema's 'Write the changes') or any prerequisites or consequences, but the dry-run default mitigates risk. Given no annotations and no output schema, the description is reasonably complete but could explicitly mention that applying is a permanent mutation.

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 description coverage is 100%, so all three parameters (name, new_name, apply) are already documented in the schema. The description's mention of 'dry run' is consistent with the apply parameter's schema text, but it adds no new semantic information beyond what the schema already provides. The description does not clarify parameter formats, constraints, or relationships, so it stays at the baseline for full coverage.

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 tool renames a symbol everywhere using compiler semantics rather than text replacement, explicitly distinguishing it from a naive search-and-replace. The verb 'rename' and resource 'symbol' are specific, and the contrast with text replacement sets it apart from any generic editing tool. Sibling tools like find_symbol and find_references are for lookup, so this tool's unique purpose is unambiguous.

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?

The description implies when to use this tool (when a semantic rename is needed) but does not explicitly state when not to use it or mention any sibling alternatives. The phrase 'rather than text replacement' gives a comparative guideline, but it does not address how this tool relates to find_references or other siblings, leaving the agent to infer that rename is the right choice. This is acceptable but not fully explicit.

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