Skip to main content
Glama

Priority — TypeScript Compiler Intelligence

Get Definition

get_definition
Read-onlyIdempotent

Return the compiler-resolved declaration for one supplied-file symbol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
nameYes
pathNo
filesNo
snapshotNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYes
limitsYes
schemaYes
symbolYes
coverageYes
returnedYes
snapshotYes
truncatedYes
definitionYes
next_offsetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the 'compiler-resolved' nuance, implying resolution across definitions, but does not disclose behavior for missing symbols or ambiguous definitions. This is adequate given the annotations.

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, concise sentence with no redundant wording. It front-loads the core action and resource, making it easy to parse quickly.

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?

With five parameters, a oneOf requirement, and zero schema descriptions, the description is too sparse. It does not explain the input options, the output structure, or any constraints. While an output schema exists, the input semantics remain unclear, leaving a significant gap for the agent.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, but it only hints at 'supplied-file symbol' without explaining parameters like kind, path, or the oneOf relationship between files and snapshot. The agent cannot infer parameter meanings from the description alone.

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 returns the compiler-resolved declaration for a symbol in a supplied file. It implies a specific verb ('Return') and resource ('declaration'), distinguishing it from siblings like find_symbol or get_type, which serve different lookup purposes.

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 explicit guidance on when to use this tool versus alternatives. It does not mention when to prefer get_definition over find_symbol, get_type, or get_symbol_context, nor any exclusions or prerequisites beyond the need for a supplied file and symbol name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources