Skip to main content
Glama
davidfstr
by davidfstr

rename_symbol

Renames a code symbol and all its references across the workspace using text-based matching. Specify old and new strings to update globally.

Instructions

Renames a symbol (function, variable, class, etc.) and all its references across the workspace.

Uses text-based matching to locate the symbol—no coordinate counting required.

Example: filePath: "/path/to/file.py" oldString: "def helper_function(" newString: "def _helper_function("

This will rename helper_function to _helper_function everywhere it's referenced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYes
oldStringYes
newStringYes
lineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It states that it renames the symbol 'and all its references', which is transparent about scope. However, it does not disclose potential side effects like handling name collisions, updating imports, or requiring confirmation. This is adequate but not fully comprehensive.

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 concise, with the main action in the first sentence. The example is helpful and well-structured. No superfluous text.

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?

There is an output schema (though not shown), so the description need not explain return values. The description covers the core behavior well. However, given no annotations, it could add more context about prerequisites or limitations, but overall it is fairly complete for a rename tool.

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 0%, so the description must compensate. The example explains the use of filePath, oldString, and newString, but the optional 'line' parameter is not described. The description adds meaning for three of four parameters via example, but missing explanation for 'line' leaves a gap.

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 verb 'renames' and the resource 'symbol (function, variable, class, etc.) and all its references across the workspace'. It distinguishes from sibling tools which are about indentation, moving strings, and outlining, none of which are rename operations.

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 explains that it uses text-based matching rather than coordinate counting, which helps the agent understand when to use this tool (for text-based symbols) versus alternatives. It does not explicitly state when not to use it, but the example provides clear usage context.

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/davidfstr/revise-mcp'

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