Skip to main content
Glama
devladinci
by devladinci

Get symbol references

get_references

Locate all usages of a given symbol across the codebase, including component references, call sites, imports, and property reads. Restrict the search to a single file when needed.

Instructions

Where a symbol is used: JSX component usages, call sites (with line numbers), which files import it by name, and where the name is written without being called — string keys, object keys, property reads (how registries, event names and route tables wire things together). Use instead of grep-ing for usages. Heuristic — for a common name, narrow with file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoRestrict to one file (repo-relative).
nameYesSymbol name (function/class/method/component as written at usage sites).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses that the tool is heuristic, warning that common names may need narrowing, which is a key behavioral trait. It also describes the types of usages returned, but does not mention performance, error handling, or whether it is read-only, leaving some gaps.

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 concise and front-loaded with the core purpose: 'Where a symbol is used.' It efficiently lists specific usage types and ends with a practical heuristic. The structure is logical and free of fluff, making it easy for an agent to parse quickly.

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?

The tool has no output schema, so the description needs to convey what the agent should expect. It does so by enumerating the kinds of usages returned (JSX, call sites with line numbers, imports, property reads). It also provides a usage heuristic, which is valuable context. Missing details include handling of no results or potential large result sets, but overall it is adequate for a 2-parameter tool.

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 schema already provides full descriptions for both parameters (name and file) with 100% coverage. The tool description reinforces the 'file' parameter's purpose with the heuristic 'narrow with file,' but does not add significant new meaning beyond the schema. Baseline of 3 is appropriate since the schema does the heavy lifting.

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: finding where a symbol is used, listing specific types of usages (JSX, call sites, imports, property reads). It distinguishes itself from siblings by its focus on usages rather than definitions or dependencies. The verb 'get' and resource 'references' make the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use instead of grep-ing for usages,' providing a clear alternative. It also includes a heuristic: 'for a common name, narrow with file,' which guides when and how to use the tool. However, it does not explicitly compare with sibling tools like find_symbol or get_deps, though the purpose is clear enough to infer appropriate usage.

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

Deploy Server

Other Tools