Skip to main content
Glama

rename_symbol

Renames a symbol across files with edit transactions, word-boundary awareness, and dry-run preview. Check impact_analysis first to see affected files.

Instructions

Execute a cross-file symbol rename (edit_transaction-based). Word-boundary, string/comment-aware. dry_run previews. To see what a rename would affect FIRST, use impact_analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile where the symbol is defined (relative to workspace_dir)
symbolYesCurrent symbol name to rename
dry_runNoPreview changes without writing (default: true)
new_nameYesNew symbol name
workspace_dirYesREQUIRED: project root (abs).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses key behaviors: 'Word-boundary, string/comment-aware' explains the matching semantics, reducing risk of unintended replacements. 'dry_run previews' explains the behavior of the dry_run parameter. It also notes the transaction-based nature. These details are essential since no annotations are provided.

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 exceptionally concise: three sentences, each packed with information. It front-loads the core purpose and uses no filler words, making it easy for an agent to parse quickly.

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 potentially destructive cross-file rename tool, the description provides context about word-boundary awareness and dry_run, and directs to impact_analysis for preview. It doesn't explain return values or error handling, but the existence of sibling tools like edit_transaction and sandbox_validate likely covers those aspects. Given its complexity, the description is mostly 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?

The input schema already contains complete parameter descriptions (100% coverage), so the tool description adds limited additional meaning. The description's mention of 'dry_run previews' reinforces the dry_run parameter's purpose but doesn't clarify formats or relationships beyond what the schema provides.

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's function: 'Execute a cross-file symbol rename (edit_transaction-based).' It specifies the verb (execute), resource (symbol rename), and scope (cross-file), and differentiates it from related tools like read_symbol and write_symbol by focusing on renaming and mentioning the edit_transaction basis.

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 explicit guidance: 'To see what a rename would affect FIRST, use impact_analysis.' This directs the agent to use a preview tool before executing a rename, which is an alternative context. However, it doesn't explicitly mention when not to use this tool or compare with other sibling tools like edit_batch or edit_transaction.

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

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/wulun811/LiuHe'

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