Skip to main content
Glama

Rename Symbol

rename_symbol
Destructive

Rename code symbols across your entire codebase to maintain consistency and improve readability. This tool updates all references to the symbol automatically.

Instructions

Renames the symbol with the given name_path to new_name throughout the entire codebase. Note: for languages with method overloading, like Java, name_path may have to include a method's signature to uniquely identify a method. Returns result summary indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
name_pathYesName path of the symbol to rename (definitions in the `find_symbol` tool apply).
relative_pathYesThe relative path to the file containing the symbol to rename.
new_nameYesThe new name for the symbol.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, but the description adds valuable context: it specifies the scope ('throughout the entire codebase'), mentions language-specific considerations (Java method overloading), and notes the return format ('result summary indicating success or failure'). This goes beyond the annotations by providing implementation details and behavioral expectations.

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 efficiently structured in two sentences: the first states the core purpose and scope, the second adds important behavioral notes and return information. Every sentence adds value without redundancy, and it's front-loaded with the primary action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive operation with codebase-wide impact), the description is complete: it covers purpose, scope, language considerations, and return format. With annotations providing safety context and an output schema presumably detailing the 'result summary', no essential information is missing for effective agent use.

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 fully documents all three parameters. The description adds minimal extra meaning: it references 'name_path' and 'new_name' in context but doesn't provide additional syntax, format, or usage details beyond what the schema descriptions state. This meets the baseline for high schema 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 specific action ('Renames'), target resource ('the symbol with the given name_path'), and scope ('throughout the entire codebase'). It distinguishes this from sibling tools like 'find_symbol' (which only locates) and 'replace_symbol_body' (which modifies content rather than renaming).

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 context for when to use this tool (renaming symbols across the codebase) and includes a helpful note about method overloading in languages like Java. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings, though the context implies it's for renaming rather than finding or replacing content.

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/chrisgreenx-ctrl/serena'

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