Skip to main content
Glama

find_usages

Read-onlyIdempotent

Locate every use of a function, class, type, or constant, including re-exports and aliases, grouped by file with line:column and usage kind. Check before changing a symbol or checking affected tests.

Instructions

Lists every place that uses one function, class, type or constant, followed through re-exports and aliases: grouped by file, each use with its line:column and kind (import, re-export, call, type, extends, reference). Use it before changing a symbol, and to see which tests reach it. A method call whose receiver type cannot be seen is marked unresolved. For where a name is defined use find_definitions; for the reach of a whole file use analyze_impact; for the call graph alone use trace_calls. symbol is a bare name when one file defines it; when several do, or for a method, write <file>::Name or <file>::Class.method, with the path relative to the repository root. Returns plain text. A long list stops at 200 items unless all is true. A name the graph does not hold is answered with an error line, with suggestions when similar names exist.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "find_usages"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoList everything instead of stopping at 200 items.
symbolYesName, <file>::Name or <file>::Class.method (a file path or module ID).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed world), and the description still adds real behaviour: unresolved method calls are marked, output is plain text, a long list is capped at 200 unless `all` is true, and an unknown name returns an error line with suggestions. That is the kind of context an agent needs to interpret results and avoid surprise truncation.

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?

Purpose, usage, disambiguation, format rules, limits and error behaviour all appear, and the core statement is front-loaded. It is dense—several long clauses packed into few sentences—which slightly hurts scannability but every sentence carries information.

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?

With no output schema, the description compensates by describing the return shape (grouped by file, line:column, kind taxonomy) and the plain-text format. For a two-parameter read-only query tool, nothing an agent needs to call it correctly or interpret the result is missing.

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; the description earns more by explaining when a bare name suffices versus when `<file>::Name` or `<file>::Class.method` is required, and that the path is relative to the repository root. The `all` parameter only gets what the schema already says, so it stops short of a 5.

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?

States a specific verb and resource ("Lists every place that uses one function, class, type or constant") and adds the follow-through scope (re-exports and aliases) plus the output shape (grouped by file, line:column, kind). It also names the sibling it is not (find_definitions, analyze_impact, trace_calls), so an agent can separate it from neighbours without reading schemas.

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?

Gives explicit when-to-use ("Use it before changing a symbol, and to see which tests reach it") and explicit alternatives with the condition that selects each: find_definitions for definitions, analyze_impact for whole-file reach, trace_calls for the call graph alone. Nothing is left to inference.

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