Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

get_code_fixes

Retrieve TypeScript compiler-proposed fixes for errors, including missing imports, members, or unused code removal. Target fixes by symbol name or file position.

Instructions

Get the fixes TypeScript itself proposes for the errors at a position, such as adding a missing import, adding a missing member, or removing unused code. Prefer this over hand-writing a fix for a reported diagnostic: the compiler already knows the exact edit, including the correct import path. Target it either by "symbol" name (preferred: no need to know coordinates) or by explicit file/line/column.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoPath to the file (relative to project root)
lineNoLine number (1-based)
columnNoColumn number (1-based)
symbolNoName of the symbol to target, instead of line/column. Qualify as "Container.member" (e.g. "UserService.getUser") to disambiguate. Combine with "file" to restrict the search to one file. An ambiguous name returns an error listing the candidates.
errorCodesNoTypeScript error codes to fix (optional). Defaults to the diagnostics reported at this position.
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It mentions that the compiler knows the exact edit and import path, but does not state whether the operation is read-only, what happens if no fixes exist, or any side effects. The description relies on the schema for ambiguous symbol behavior, which is insufficient for full transparency.

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 concise at four sentences, with each sentence providing distinct value: purpose, preference over manual fixes, targeting methods, and a hint about disambiguation. No redundant or unnecessary text.

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

Completeness2/5

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

The tool has 5 parameters, no output schema, and many siblings. The description does not describe the return format (e.g., what a fix looks like), does not mention the `errorCodes` parameter, and does not explain how to use the output in conjunction with `apply_code_fix`. This leaves significant gaps for an AI agent to correctly invoke and process the tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by recommending the `symbol` parameter as preferred and explaining the `Container.member` qualification, which is already in the schema but reinforced. It also provides a usage hint about not needing coordinates, which is not in the schema, slightly improving semantics.

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 retrieves fixes proposed by TypeScript for errors at a position, with examples like adding imports or removing unused code. It is specific and distinguishes from general diagnostic tools, but does not explicitly differentiate from sibling tools like `apply_code_fix` or `get_diagnostics`.

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 advises preferring this tool over hand-writing fixes and explains two targeting methods (symbol vs. coordinates), with a preference for symbol. However, it does not provide guidance on when to use alternatives like `apply_code_fix` or when not to use this tool, which is important given the many sibling tools.

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/jgauffin/ts-language-mcp'

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