Skip to main content
Glama
Chia1104

tsserver-mcp-server

by Chia1104

get_completions

Retrieve code completion suggestions at any cursor position in TypeScript/JavaScript. Supply file contents, line, and offset to get accurate completions, with optional project path for cross-file imports.

Instructions

Get completion suggestions (completion list) at the given position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesCursor line (1-based)
offsetYesCursor column (1-based)
filePathYesFile path (absolute or relative to project root)
fileContentYesFile content (TypeScript/JavaScript source code)
projectPathNoProject root (directory with node_modules/tsconfig). When set, the server reads project files from disk so imports (e.g. zod) and cross-file features work.
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states the basic action without revealing any side effects, prerequisites, or return behavior. For instance, it doesn't mention that projectPath enables reading files from disk or that completions depend on fileContent.

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 a single, front-loaded sentence with no wasted words. It is appropriately concise for a simple query tool, and the structure is clear.

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 description is minimal and lacks essential context. There is no output schema and no annotations, so the description should explain more about what to expect from a completion list or how the line/offset/position parameters relate. It is incomplete for a tool with five parameters and no other documentation.

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% with descriptions for all five parameters. The description adds no semantic value beyond the schema, but the schema already fully documents each parameter, so the baseline of 3 is appropriate.

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's function: 'Get completion suggestions (completion list) at the given position'. The verb 'get' and resource 'completion suggestions' are specific, and it distinguishes from siblings like get_definition or get_references by focusing on completions.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description only states what it does, not the contexts in which it is appropriate or preferable, nor any exclusions.

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/Chia1104/tsserver-mcp-server'

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