Skip to main content
Glama

find_usages

Read-onlyIdempotent

Find all references to a symbol or file across codebases—imports, calls, renders, dispatches. Uses semantic matching instead of text grep to locate exact usages and avoid false positives.

Instructions

Find all references to a symbol or file (imports, calls, renders, dispatches). Use instead of Grep for symbol usages — semantic, not text matches. For raw text use search_text; for a bidirectional call graph use get_call_graph. Weakly-grounded text_matched edges into a name-colliding target are dropped by default (phantom god-node filter); include_ambiguous_text_matched: true keeps them. Read-only. Returns JSON: { references: [{ edge_type, resolution_tier, file, symbol }], total, truncated?, ambiguous_filtered? } — page caps at 50, total counts all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fqnNoFully qualified name to find references for
limitNoMax references returned (default 50).
file_pathNoFile path to find references for
symbol_idNoSymbol ID to find references for
detail_levelNoOutput verbosity. "minimal" returns ~40-60% fewer tokens (drops scores, fqn, signatures, summaries — keeps name/file/line). Use when you only need to pick a candidate before drilling in with get_symbol. Default: "default".
include_ambiguous_text_matchedNoKeep text_matched edges whose target name collides with >=3 other symbols (default false — they produce phantom god-nodes).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.22.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Max references returned (default 50).",
      +  "maximum": 1000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "symbol_id",
      -  "fqn",
      -  "file_path"
      -]
  2. Changed1 schema field changedv3.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  3. Added
  4. Removedv1.38.0
  5. Changed4 schema fields changedv1.35.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / detail_level
      Added value: +{
      +  "description": "Output verbosity. \"minimal\" returns ~40-60% fewer tokens (drops scores, fqn, signatures, summaries — keeps name/file/line). Use when you only need to pick a candidate before drilling in with get_symbol. Default: \"default\".",
      +  "enum": [
      +    "minimal",
      +    "default",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / include_ambiguous_text_matched
      Added value: +{
      +  "description": "Keep text_matched edges whose target name collides with >=3 other symbols (default false — they produce phantom god-nodes).",
      +  "type": "boolean"
      +}
    • addedInput schema / required
      Added value: +[
      +  "symbol_id",
      +  "fqn",
      +  "file_path"
      +]
  6. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Even though annotations already declare readOnlyHint, idempotentHint, and destructiveHint, the description adds valuable behavioral context: the phantom god-node filter, how include_ambiguous_text_matched changes behavior, the read-only nature, and the return shape including truncation and total counts. No contradictions with 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 front-loaded with purpose and routing, then packs behavioral nuances, read-only status, and return format into compact sentences. Every sentence earns its place; nothing is redundant or filler.

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

Completeness5/5

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

For a tool with no output schema, the description fully covers return values, truncation, ambiguous filtering, and page limits. It also addresses key behavioral edge cases and provides enough guidance for correct invocation despite having six optional parameters.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful context beyond the schema: it explains the ambiguous text-matching flag's purpose, the pagination cap, and the structure of references. This helps the agent understand the interplay between parameters and results.

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 a specific verb and resource: 'Find all references to a symbol or file (imports, calls, renders, dispatches)'. It further clarifies semantic vs. text matching and explicitly differentiates itself from siblings like search_text and get_call_graph.

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

Usage Guidelines5/5

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

It explicitly says 'Use instead of Grep for symbol usages' and gives direct alternatives: 'For raw text use search_text; for a bidirectional call graph use get_call_graph.' This gives the agent clear routing guidance with little left to inference.

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