Skip to main content
Glama
aferreiraguido

javascript-mcp-server

variable_xref

Trace a variable's data flow: identify its definitions, reads, and writes in a JavaScript/TypeScript project.

Instructions

Data-flow cross-reference of a variable: where it is defined, read and written (semantic DEFINITION/WRITE/READ classification via ts-morph).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
symbolYesVariable name
Behavior2/5

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

With no annotations, the description must carry the full burden of behavioral disclosure. It mentions the semantic classification scheme but does not state whether the tool is read-only, what prerequisites exist (e.g., loaded project), or how errors are handled. It lacks explicit transparency about safety and operational behavior beyond the core purpose.

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, front-loaded sentence that clearly states the tool's purpose and distinguishing trait. Every phrase contributes meaningful information without redundancy or fluff, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the core functionality well for a 2-parameter tool, but it leaves gaps: no output schema, no usage context or alternatives, and no details about edge cases (e.g., undefined variables, multiple matches). It is adequate for a straightforward analysis but not fully complete given the lack of other structured documentation.

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 both parameters ('name' and 'symbol') are already documented. The description does not add further meaning beyond the schema, but it reinforces 'variable' as the symbol. This meets the baseline but does not exceed it.

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's function: 'Data-flow cross-reference of a variable' with specific sub-actions (defined, read, written) and a distinct semantic classification via ts-morph. This distinguishes it from sibling tools like find_references or list_variables by emphasizing data-flow classification rather than simple reference listing.

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 implies usage for analyzing variable definitions/reads/writes, but it does not explicitly mention when to use this tool over alternatives like find_references, nor does it state any exclusions or prerequisites (e.g., project must be loaded). The context is clear enough to infer intent, but guidance is not explicit.

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/aferreiraguido/javascript-mcp-server'

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