Skip to main content
Glama

apply_rename

Rename code symbols across all usages with automatic conflict detection to maintain code integrity during refactoring.

Instructions

Rename a symbol across all usages (definition + all importing files). Runs collision detection first and aborts on conflicts. Returns the list of edits applied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbol_idYesSymbol ID to rename (from search or outline)
new_nameYesNew name for the symbol
dry_runNoPreview changes without applying (default: false)
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral context: it discloses collision detection, abort behavior on conflicts, and that it returns a list of edits applied. This covers key operational traits beyond basic renaming, though it could mention permissions or side effects.

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 front-loaded with the core action, followed by key behavioral details and return value in just two sentences. Every sentence adds critical information with zero waste, making it highly efficient and well-structured.

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 and no output schema, the description does well by explaining the rename operation, collision detection, abort logic, and return format. However, it could improve by detailing error conditions or the structure of the returned edits list to be fully complete.

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 the schema already documents all parameters thoroughly. The description does not add any additional meaning or examples for parameters like 'symbol_id' or 'new_name', sticking to the baseline when schema does the heavy lifting.

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 specific action ('Rename a symbol across all usages') and distinguishes it from siblings like 'check_rename' (which likely only checks) and 'apply_move' (which moves rather than renames). It specifies both definition and importing files, making the scope explicit.

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 usage when renaming symbols with collision detection, but does not explicitly state when to use this tool versus alternatives like 'check_rename' or 'change_signature'. It mentions aborting on conflicts, which provides some context but lacks clear guidance on prerequisites or comparisons.

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/nikolai-vysotskyi/trace-mcp'

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