Skip to main content
Glama
gclluch

TypeScript AST MCP Server

by gclluch

find_usages

Find every occurrence of a variable, function, or type in a TypeScript/JavaScript file. Identify all usages of an identifier to trace dependencies or refactor safely.

Instructions

Finds all occurrences of a specific identifier (variable, function, type) within a file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the TS/JS file
identifierYesThe name of the identifier to search for
Behavior2/5

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

With no annotations, the description must carry the transparency burden, but it only states the search behavior without disclosing whether the operation is read-only, how results are returned, or any limitations. It also does not clarify if it searches comments, strings, or only code, which is a significant ambiguity.

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 sentence that directly states the tool's purpose without any extraneous information. It is appropriately sized and front-loaded.

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 lacks information about the return format or output structure, which is critical since there is no output schema. It also does not provide context about the tool's behavior beyond the basic search, making it incomplete for an agent to know what to expect.

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?

The input schema fully describes both parameters (path and identifier) with clear descriptions, and parameter coverage is 100%. The description adds no additional parameter semantics, which is acceptable under the baseline for high schema coverage.

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 states the tool finds all occurrences of a specific identifier within a file, specifying the verb, resource, and scope. It distinguishes itself from sibling tools like list_declarations by focusing on usages rather than declarations.

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 like list_declarations or find_implementations. There is no mention of prerequisites, exclusions, or typical scenarios.

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/gclluch/ts-ast-mcp'

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