Skip to main content
Glama
AndyLiner13

ts-mcp-server

by AndyLiner13

Get Applicable Refactors

getApplicableRefactors
Read-only

Check which refactorings are available at a given code position or selection. Retrieve a list of possible actions with descriptions and reasons why some may not apply.

Instructions

Discover what refactorings are available at a position or selection. Use before attempting a refactor to see what's possible. Returns a list of available refactors with their actions, descriptions, and any reasons why certain actions may not apply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile path (absolute or relative to cwd)
endLineYes1-based end line
endOffsetYes1-based end column
startLineYes1-based start line
startOffsetYes1-based start column
triggerReasonNoOptional trigger reason
Behavior5/5

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

Annotations already declare readOnlyHint=true. The description adds behavioral context by detailing the return value: 'list of available refactors with their actions, descriptions, and reasons why certain actions may not apply'. No contradictions.

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?

Two sentences, front-loaded with purpose, no fluff. Every sentence adds value: first states purpose, second provides usage guidance and output description.

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

Completeness5/5

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

No output schema, but description sufficiently explains the return value. Given the sibling tools, the description provides enough context for an agent to understand this is a read-only discovery tool.

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 the schema already documents all parameters. The description does not add any additional parameter semantics beyond what is in the schema, meeting the 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 uses the verb 'Discover' and specifies 'refactorings available at a position or selection', clearly identifying the tool's purpose. It distinguishes from sibling refactoring tools like extractConstant by being the preliminary discovery step.

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

Usage Guidelines4/5

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

States 'Use before attempting a refactor to see what's possible', providing clear when-to-use guidance. Does not explicitly mention alternatives, but the context of sibling tools implies this is the discovery step.

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