Skip to main content
Glama
jaenster
by jaenster

getDefinition

Retrieve definition locations for a symbol at a specific position in a TypeScript file. Enables jump-to-definition navigation for both saved and unsaved files.

Instructions

Get the definition location(s) for a symbol at a position (go-to-definition)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colNoColumn number (1-indexed), overrides :col in file
fileYesFile path with optional :line:col suffix (e.g., "src/user.ts:10:5")
lineNoLine number (1-indexed), overrides :line in file
contentNoFile content for virtual/unsaved files
projectRootNoProject root directory (auto-detected if omitted)
Behavior3/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 states that this is a read operation ('get'), but does not disclose error handling, behavior when a symbol is not found, or any side effects. The description is accurate but minimal.

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, well-structured sentence that is concise and front-loaded. Every word serves a purpose with no redundant information.

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?

Given the commonality of the go-to-definition operation and the presence of sibling tools, the description provides sufficient context for most agents. However, it does not describe the return format or behavior for edge cases, which would be desirable.

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 input schema already fully documents all 5 parameters. The description adds no additional meaning beyond what the schema provides. Baseline 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 verb 'Get', the resource 'definition location(s)', and the context 'for a symbol at a position'. The parenthetical 'go-to-definition' reinforces the purpose. It is distinct from sibling tools like getHover and getReferences.

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 lacks explicit guidance on when to use this tool versus alternatives. It does not mention exclusions, prerequisites, or when not to use it. The purpose is clear but the agent must infer usage from the name alone.

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/jaenster/ts-lsp-mcp'

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