Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

get_type_definition

Jump to the type declaration of a symbol, landing on its type interface instead of the variable itself. Target by symbol name or file/line/column coordinates.

Instructions

Jump to the declaration of a symbol's TYPE rather than of the symbol itself. For const u = getUser() this lands on the User interface, where get_definition lands on the variable. 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.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It transparently discloses the dual targeting modes (symbol vs. coordinate), precedence order (symbol preferred), and error behavior for ambiguous names. It omits disclosure of potential side effects or performance implications, but as a jump/navigate tool these are minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

At two sentences, the description is efficient and front-loaded with the key distinction. Every sentence adds value: the first defines the tool's unique action; the second explains targeting options. Minor room for improvement: could front-load the targeting options more aggressively.

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?

Given the tool is a navigation/jump operation with no output schema, the description fully covers the what, why, and how. It explains the two targeting modes (symbol vs. coordinates), disambiguation for qualified names, error behavior, and the relationship to sibling 'get_definition'. No gaps for typical usage.

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?

The schema description coverage is 100%, so the baseline is 3. The description adds clear value by explaining the 'symbol' parameter supports qualification ('Container.member') for disambiguation, which goes beyond the schema's brief note. It also clarifies that using 'symbol' with 'file' restricts search scope, enriching the parameter semantics.

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 specific verbs ('Jump to the declaration') and clearly distinguishes this tool from its sibling ('get_definition'). It provides an explicit example contrasting landing on a variable vs. its type interface, making the purpose unmistakable.

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?

The description explicitly states when to use this tool (to navigate to a symbol's type declaration rather than the symbol itself) and provides concrete guidance on how to target via 'symbol' name (preferred) or explicit file/line/column. It also explains what happens with ambiguous names, offering clear usage rules.

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