Skip to main content
Glama

find_usages

Find symbol references grouped by definitions, imports, and usages. Filter by scope, kind, language, and limit results. Include context lines for surrounding code.

Instructions

Use INSTEAD OF Grep for finding symbol references. Semantic search — groups by: definitions, imports, usages. Supports scope, kind, limit, lang filters. Use context_lines to include surrounding code. HINT: for very short / generic symbols (≤4 chars like id, err, Cmd, db) Grep is usually cheaper than find_usages — the semantic grouping doesn't pay off when the symbol resolves ambiguously across thousands of files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesSymbol name to find usages of
scopeNoFilter results by path prefix (e.g., "src/Domain/")
kindNoShow only specific section (default: "all")
limitNoMax results per category (default: 50, max: 500)
langNoFilter by language/extension (e.g., "php", "typescript")
context_linesNoLines of source context around each match (0-10). When set, shows surrounding code — saves follow-up read_symbol calls.
modeNoOutput mode: full (with context, default), list (file:line only, 5-10x smaller for initial discovery)
Behavior5/5

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

Despite no annotations, the description discloses key behavioral traits: semantic grouping, support for scope/kind/limit/lang filters, context_lines for surrounding code, and mode options. It also warns about cost implications for short symbols, aiding agent decision-making.

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?

Extremely concise: two sentences plus a hint. Front-loaded with the most important usage guidance. Every sentence contributes useful information without redundancy.

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?

Given 7 parameters (1 required) and no output schema, the description covers all parameters sufficiently. It explains the purpose of each optional parameter and provides a usage hint. Could mention return format, but minimal gap.

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 baseline is 3. The description adds meaning beyond schema by explaining that context_lines 'saves follow-up read_symbol calls' and that list mode is '5-10x smaller for initial discovery.' This adds practical value.

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 finds symbol references using semantic search, grouping by definitions, imports, and usages. It explicitly distinguishes itself from Grep, making its purpose specific and unambiguous.

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?

Provides explicit guidance: 'Use INSTEAD OF Grep for finding symbol references.' Includes a concrete hint about when Grep is preferable (for short/generic symbols), giving clear context for choosing this tool vs alternatives.

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/Digital-Threads/token-pilot'

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