Skip to main content
Glama

rename_symbol

Rename a code symbol safely across its definition and all resolved references, leaving strings, comments, and unrelated same-named symbols untouched. Review a dry-run plan before applying.

Instructions

Rename a symbol at its definition and every reference that resolves to it (identifier nodes only: strings, comments and same-named symbols elsewhere are untouched; ambiguous references are listed and skipped). Defaults to dry_run=True: review the plan, then call again with dry_run=False.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathNo
dry_runNo
new_nameYes
include_testsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.4/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 safety burden. It discloses that only identifier nodes are changed, strings/comments/same-named symbols elsewhere are untouched, and ambiguous references are listed and skipped. It also explains the default dry_run behavior. Minor gap: no mention of required permissions or reversibility.

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 sentences, tightly written, front-loading scope constraints and then the dry-run workflow. Every clause earns its place.

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?

An output schema exists, so return values need not be described. The description covers the tool's behavior, safety defaults, and edge-case handling (ambiguous references, non-identifier nodes). It is nearly complete for a rename tool, though additional parameter semantics would strengthen it.

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 0%, so the description must compensate. It explains the dry_run parameter's default and workflow, but does not describe name, new_name, path, or include_tests semantics. Given five parameters and zero schema descriptions, more parameter detail would be expected, but the dry_run guidance is critical and well-covered.

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?

States a specific verb (rename) and resource (symbol at its definition and every reference that resolves to it), and clarifies the exact node types affected, which distinguishes it from siblings like replace_symbol and references.

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?

Provides clear guidance on the dry-run workflow: review the plan, then call again with dry_run=False. However, it does not explicitly say when to prefer this tool over replace_symbol or impact, leaving some alternative selection to inference.

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