Skip to main content
Glama
reflex-search

Reflex

Official

find_references

Locate a symbol's definition and all its usages across the codebase in one call. Simplify refactoring, impact analysis, and rename planning by seeing every reference at once.

Instructions

Find a symbol's definition AND all usage sites in a single call.

Purpose: Eliminates the two-step pattern of search_code(symbols=true) + search_code(). Returns both the definition and all usages atomically.

Returns: {definition, references, total_references, pagination, status}

Use this when:

  • "Find all callers of X" — the most common agent refactoring pattern

  • Code review: understand impact before changing a function or class

  • Rename planning: see every site that needs updating

  • Dead code detection: confirm nothing calls a function before removing it

definition: First matching symbol definition {path, line, kind, symbol, span, preview}, or null if no symbol definition exists for the pattern.

references: Flat array of {path, line, preview} — all textual occurrences including the definition site itself.

Pagination applies to references only. Use limit and offset. Check pagination.has_more for more pages.

Error Handling: If you receive an error message containing "Index not found" or "stale", immediately call the index_project tool, wait for it to complete, then retry this operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
excludeNoExclude files matching glob patterns (e.g., ['target/**', 'tests/**'])
forceNoForce execution of potentially expensive queries (bypasses broad query detection)
globNoInclude files matching glob patterns (e.g., ['src/**/*.rs'])
kindNoFilter definition lookup by symbol kind (function, class, struct, trait, etc.)
langNoFilter by language (rust, typescript, python, go, etc.)
limitNoMax references per page (default: 100). Pagination applies to references only.
offsetNoPagination offset for references (skip first N). Use with limit.
patternYesSymbol name or text pattern to find references for (e.g., 'CacheManager', 'extract_symbols')
Behavior4/5

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

No annotations, so description carries full burden. It details the return structure, pagination behavior, and error handling. Could be improved by noting performance implications for broad queries.

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?

Well-structured with clear purpose, use cases, and technical details. Every sentence adds value. Front-loaded with core purpose and benefits.

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 8 parameters and no output schema, description covers key behavioral aspects: returns definition and references, pagination, error handling. Missing explicit return type details but includes example shape.

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 coverage is 100%, so baseline is 3. Description adds context for some parameters like pagination applying only to references, but does not elaborate on all parameters beyond schema descriptions.

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 it finds a symbol's definition and all usage sites in a single call, eliminating a two-step pattern. It distinguishes from siblings like search_code, which is used for general code search.

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 use cases: 'Find all callers of X', code review, rename planning, dead code detection. Also explains when not to use via alternatives like search_code, and includes error recovery steps.

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/reflex-search/reflex'

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