Skip to main content
Glama

rename_symbol

Rename TypeScript symbols (variables, functions, classes) across your entire codebase to maintain consistency and update references automatically.

Instructions

Rename a TypeScript symbol (variable, function, class, etc.) across the codebase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYesRoot directory for resolving relative paths
filePathYesFile path (relative to root)
lineYesLine number (1-based) or string to match in the line
oldNameYesCurrent name of the symbol
newNameYesNew name for the symbol
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose that this is a destructive mutation (renames symbols globally), potential side effects (e.g., breaking references), error conditions, or output format. This is inadequate for a complex refactoring tool with significant behavioral implications.

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 a single, efficient sentence with zero wasted words. It front-loads the core action and scope, making it immediately understandable without unnecessary elaboration.

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

Completeness2/5

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

For a complex, destructive refactoring tool with 5 parameters and no annotations or output schema, the description is insufficient. It lacks critical context about mutation behavior, error handling, and what happens after renaming (e.g., success confirmation or diff output), leaving significant gaps for agent understanding.

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 fully documents all 5 parameters. The description adds no parameter-specific information beyond implying that 'oldName' and 'newName' refer to TypeScript symbols. 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 action ('Rename'), the target ('TypeScript symbol'), and scope ('across the codebase'), with specific examples of symbol types (variable, function, class, etc.). It distinguishes from siblings like delete_symbol (destructive removal) and find_references (read-only search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like delete_symbol or find_references. It doesn't mention prerequisites (e.g., needing a TypeScript project) or exclusions (e.g., not for non-TypeScript files), leaving the agent to infer 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/SomeiLam/news-mcp'

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