Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

rename_preview

Preview all file locations and positions that would change when renaming a TypeScript symbol. Check impacts before applying a rename to avoid unwanted modifications.

Instructions

Preview what locations would change when renaming a symbol. Shows all affected files and positions without making changes.

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?

With no annotations provided, the description correctly discloses that the tool performs a preview and makes no changes. It clearly states that it shows all affected files and positions, which covers the key behavioral trait of being non-destructive. However, it does not mention what happens on ambiguity or error (though the schema covers that), and there is no mention of other potential side effects or authorization needs. Overall, it is transparent enough for a safe preview tool.

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 two sentences, both of which are essential: the first states the high-level purpose, and the second clarifies the non-destructive nature. Every sentence earns its place. It is appropriately sized and front-loaded.

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

Completeness3/5

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

Despite having 5 parameters and no output schema, the description is brief. It does not describe the format of the preview result (e.g., list of file paths, line numbers, column numbers). Without output schema, this information is important for the agent to understand the return value. The description also lacks guidance on parameter combinations. It is adequate but not fully complete for the tool's complexity.

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 each parameter is already described in the schema. The tool description adds no additional meaning about parameters (e.g., how to choose between the symbol vs line/column options). According to guidelines, baseline is 3, and there is no extra value added beyond the schema.

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 'Preview' and the resource 'locations that would change when renaming a symbol.' It distinguishes the tool from its sibling 'rename_symbol' by emphasizing that it shows affected files without making changes. The purpose is specific and unambiguous.

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

Usage Guidelines3/5

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

The description implies usage by stating it previews changes before renaming, but it does not explicitly say when to use it versus alternatives (e.g., 'use this before rename_symbol'). No when-not-to-use guidance is provided. The context with siblings suggests the workflow, but the description itself lacks explicit usage directives.

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