Skip to main content
Glama

usages

Read-onlyIdempotent

Finds every file, line, and column where a function, class, type, or constant is used, including imports, re-exports, aliases, calls, types, and references, and flags unresolved method calls.

Instructions

Every place that uses one function, class, type or constant, through re-exports and aliases: by file, with line:column and the kind of use (import, re-export, call, type, extends, reference); method calls whose receiver type is not in sight are marked unresolved.

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": "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. First observedv0.6.1

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior, so the description only needs to add context — and it does: it discloses that re-exports and aliases are traversed and that method calls with an unseen receiver type are flagged unresolved. That unresolved-marker caveat is exactly the kind of result-shaping detail annotations cannot convey.

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?

A single front-loaded sentence that leads with scope and then layers output shape and the unresolved caveat via a semicolon. Dense but every clause carries information; no filler or restatement of the title.

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?

With no output schema, the description takes on the job of describing returns and does so well (grouped by file, line:column, kind of use). The 200-item default cutoff lives in the schema rather than the description, which is a minor gap but not one that would cause a mis-call.

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%, and the schema already documents both the symbol forms (<file>::Class.method) and the `all` flag's 200-item truncation behavior. The description adds no parameter meaning beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation (find every place that uses a function, class, type or constant) and enumerates what counts as a use (import, re-export, call, type, extends, reference). That is concrete enough to separate it from narrower siblings like find_callers or find_calls, though it never names a sibling to sharpen the distinction.

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?

There is no explicit when-to-use or when-not-to-use guidance and no routing to alternatives, despite siblings such as find_callers, rdeps and find_calls that clearly overlap. The reader must infer from the output description that this is the broad reference-search tool rather than a call-graph tool.

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