Skip to main content
Glama
Stefan-Nitu

mcp-refactor-typescript

by Stefan-Nitu

Refactoring

refactoring

Rename symbols, extract functions, or move code between files with automatic import updates. Safely refactor TypeScript/JavaScript using the compiler for type-aware transformations.

Instructions

Rename symbols, extract functions, or move symbols to files (auto-updates imports).

vs Edit: Updates ALL refs (imports, JSDoc, dynamic imports). Impossible by hand.

Use when: Renaming, extracting, or moving symbols between files. Always use this.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
filePathYes
lineYes
textYes
nameNo
destinationPathNo
previewNo
Behavior4/5

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

Annotations (readOnlyHint=false, destructiveHint=false) are complemented by description that says tool 'Updates ALL refs (imports, JSDoc, dynamic imports). Impossible by hand.' This adds useful behavioral context beyond annotations.

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?

Concise four-sentence description, front-loaded with main actions, each sentence adds value. No redundancy.

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?

Covers purpose and usage well, but lacks details on return values, preview behavior, and error handling. Given 7 parameters and no output schema, more completeness would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description does not explain individual parameters like 'line', 'text', 'destinationPath', etc. It only mentions operations and vague inputs, insufficient for agent to use correctly.

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 does renaming, extracting, and moving of symbols with automatic import updates. It distinguishes itself from an 'Edit' tool, providing differentiation from a sibling-like action.

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?

Explicitly states when to use: 'Rename, extracting, or moving symbols between files. Always use this.' Also contrasts with 'Edit' tool, giving clear contextual guidance.

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/Stefan-Nitu/mcp-refactor-typescript'

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