Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

get_references

Find all usages of a symbol in a TypeScript project, including definitions, reads, and writes. Target by symbol name or file coordinates.

Instructions

Find all usages of a symbol across the project. Each reference includes its kind: "definition", "read", or "write", and the source line it sits on. 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)
limitNoMaximum results to return (default: 200, max: 2000)
columnNoColumn number (1-based)
offsetNoNumber of results to skip, for paging through a large set (default: 0)
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.
contextLinesNoInclude this many source lines either side of each result (default: 0). Every result already carries its own line in "text".
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 discloses that results include kind, source line, and text, and mentions error behavior for ambiguous symbols. However, it does not state whether the operation is read-only, mention performance implications, or describe any rate limits—leaving gaps for a tool that may scan large projects.

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?

The description is four sentences, each earning its place: purpose, result details, targeting methods, and error behavior. It is efficient and front-loaded with the core action. However, it could be slightly tighter by removing the parenthetical 'preferred: no need to know coordinates' which is already implied.

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 7 parameters and no output schema, the description covers the essential usage: what results contain, how to target, and pagination support. It does not explicitly state what happens when a symbol is not found or if the file path is invalid, but these are minor omissions. Overall, the agent has enough information to invoke the tool correctly.

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 description coverage is 100%, but the description adds significant value beyond the schema: it explains that symbol is 'preferred' and how to qualify ambiguous names, it notes that combining with 'file' restricts scope, and it clarifies that 'contextLines' is additional to the already-carried line text. This enhances the agent's understanding of parameter intent.

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?

Clearly states the verb 'find' and resource 'usages of a symbol across the project'. Distinguishes from siblings like get_definition or get_implementations by focusing on all usages rather than definitions or implementations. The description also notes the two targeting methods, making it unambiguous.

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?

Provides guidance on when to use symbol name vs coordinates (preferring symbol) and mentions combining with 'file' to restrict scope. However, it does not explicitly compare to sibling tools (e.g., when to use get_references vs get_definition or get_implementations), leaving the agent to infer usage context.

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