Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

rename_symbol

Rename a symbol across a TypeScript project, including shorthand properties and aliased imports, and writes changes to disk with a summary of modifications.

Instructions

Rename a symbol across the project, writing the changes to disk. Handles shorthand properties and aliased imports correctly. Returns summary of files modified and total changes made. Target it either by "symbol" name (preferred: no need to know coordinates) or by explicit file/line/column.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoPath to the file (relative to project root)
lineNoLine number (1-based)
columnNoColumn number (1-based)
symbolNoName of the symbol to target, instead of line/column. Qualify as "Container.member" (e.g. "UserService.getUser") to disambiguate. Combine with "file" to restrict the search to one file. An ambiguous name returns an error listing the candidates.
newNameYesThe new name for the symbol
Behavior4/5

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

The description discloses key behaviors: the tool writes changes to disk (persistence), handles shorthand properties and aliased imports correctly (edge case handling), and returns a summary of files modified and total changes. No annotations are provided, so the description carries full burden; it covers mutation and return behavior well, though it could mention whether the operation is reversible or if confirmation is needed.

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 three sentences, front-loaded with purpose, followed by key behavioral details and then usage guidance. Every sentence adds unique value with no redundancy or filler, making it efficient for an agent to parse.

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?

Given the tool's complexity (5 params, anyOf constraint, no output schema), the description provides enough detail for usage: targeting methods, disambiguation, and return summary. However, without an output schema, describing the return format in more detail (e.g., structure of summary) would improve completeness slightly.

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 coverage is 100%, so the baseline is 3. The description adds value by explaining the dual targeting mechanism and qualification syntax for disambiguation ('Container.member'), which goes beyond the schema's brief descriptions. However, it doesn't add detail to 'newName' beyond what the schema provides, keeping the score at baseline.

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 'rename' and the resource 'symbol', explaining that it writes changes to disk and returns a summary. It distinguishes itself from siblings like 'get_references' or 'rename_preview' by emphasizing it performs the actual rename operation, while tools like 'rename_preview' likely just preview changes.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use each targeting method: 'symbol' name is preferred because it avoids needing coordinates, and the alternative file/line/column approach is documented. It also explains how to disambiguate symbols (e.g., 'Container.member') and warns that ambiguous names return an error with candidates, which helps the agent avoid errors.

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/jgauffin/ts-language-mcp'

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