Skip to main content
Glama
AndyLiner13

ts-mcp-server

by AndyLiner13

Inline Variable

inlineVariable
Destructive

Replace all references to a variable with its initializer and delete the variable's declaration.

Instructions

Inline a variable — replace all references with the variable's initializer and delete the declaration. Position must be on the variable name in its declaration or any usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile path (absolute or relative to cwd)
lineYes1-based line number
offsetYes1-based character offset on the line
previewYesIf true, only preview changes
Behavior4/5

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

Annotations indicate destructiveHint: true, and the description aligns by stating 'delete the declaration.' It adds behavioral context beyond annotations by specifying the positioning constraint and the replacement of all references, which is critical for correct invocation.

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 with no fluff. The first sentence states the purpose and effect, and the second provides essential positioning guidance. Every word earns its place.

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

Completeness4/5

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

For a well-known refactoring with a clear action and positioning requirement, the description is largely sufficient. It could be improved by noting potential failure cases or confirming that the tool directly modifies the file (implied by destructiveHint).

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?

The input schema has 100% description coverage, so parameters are already well-documented. The description does not add new semantics for individual parameters beyond implying that 'line' and 'offset' should point to the variable name, which is more of a usage guideline.

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 action ('Inline a variable') and explains what it does ('replace all references with the variable's initializer and delete the declaration'). This distinguishes it from sibling refactoring tools like extractConstant or extractFunction, though it does not explicitly contrast them.

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 provides a specific usage condition: 'Position must be on the variable name in its declaration or any usage.' This guides where to invoke the tool but does not discuss when to use this refactoring versus alternatives (e.g., when to inline vs. extract), leaving usage context implied.

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