Skip to main content
Glama
AndyLiner13

ts-mcp-server

by AndyLiner13

Rename / Move File or Folder

getEditsForFileRename

Renames or moves TypeScript/JavaScript files or folders and automatically updates all import paths across the project. Supports .ts, .tsx, .js, .jsx.

Instructions

Rename or move a TypeScript/JavaScript file OR folder and automatically update all import paths across the project. Supports .ts, .tsx, .js, .jsx. tsserver auto-discovers the relevant tsconfig.json. For folders, all imports referencing files inside the folder are updated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesNew file or folder path (absolute or relative to cwd)
fromYesCurrent file or folder path (absolute or relative to cwd)
previewYesIf true, show what would change without applying anything
Behavior4/5

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

With no annotations, the description effectively discloses key behaviors: automatic import path updates across the project, support for folders, and the preview mode that shows changes without applying. It does not cover error handling or mutation details beyond the preview parameter, which is acceptable for this tool's scope.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise—three sentences with the main action front-loaded. Every sentence adds value, though the structure could be slightly improved by separating file and folder handling more distinctly.

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?

The description is reasonably complete for a tool with no output schema, covering what the tool does and the preview feature. However, it does not describe the output format (e.g., applied changes vs. edit list) or potential side effects, leaving some ambiguity for the agent.

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 schema already explains the three parameters (from, to, preview). The description adds no additional parameter-specific meaning beyond what the schema provides, meeting the baseline for coverage but not exceeding it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool renames or moves a file/folder and updates import paths, specifying supported file types (.ts, .tsx, .js, .jsx). However, it does not explicitly differentiate from sibling tools like 'rename' or 'moveSymbol', which may have overlapping or distinct purposes.

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 when renaming/moving files with import path updates needed, but lacks explicit when-to-use/when-not-to-use guidance or comparisons to alternatives (e.g., the 'rename' tool for symbol renames). The context of tsserver auto-discovery is helpful but not directive.

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/AndyLiner13/ts-mcp-server'

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