Skip to main content
Glama
AndyLiner13

ts-mcp-server

by AndyLiner13

Move Symbol

moveSymbol
Destructive

Move top-level declarations like functions, classes, types, or constants to another file with automatic import rewiring across the project.

Instructions

Move top-level declarations (functions, classes, types, constants) to another file. Automatically rewires all imports across the project. If the target file does not exist, tsserver creates it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile path (absolute or relative to cwd)
endLineYes1-based end line
previewYesIf true, only preview changes
endOffsetYes1-based end character offset
startLineYes1-based start line
targetFileYesDestination file path (absolute or relative to cwd)
startOffsetYes1-based start character offset
Behavior4/5

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

Annotations already provide destructiveHint=true. The description adds that it automatically rewires all imports across the project and creates the target file if it doesn't exist, which provides valuable behavioral context beyond the annotation.

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 three sentences, concise and front-loaded. It covers the main action, side effects, and edge case (target file creation). No unnecessary words, but could be more structured (e.g., bullet points).

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?

Given no output schema, the description does not explain what the tool returns (e.g., a code edit or confirmation). It mentions 'preview' parameter but doesn't clarify behavior when preview is true. Completeness is adequate but has gaps.

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 all parameters have descriptions in the schema. The description does not add additional meaning beyond what the schema already provides. It mentions 'top-level declarations' but does not clarify the selection range parameters further.

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 moves top-level declarations (functions, classes, types, constants) to another file, which is a specific verb and resource. It distinguishes from siblings like extractFunction and getMoveToRefactoringFileSuggestions by specifying the scope (top-level) and automatic import rewiring.

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 explains what the tool does but does not explicitly state when to use it versus alternatives like extractFunction or rename. No guidance on when not to use it or prerequisites (e.g., using getMoveToRefactoringFileSuggestions first).

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