Skip to main content
Glama
reflex-search

Reflex

Official

find_references

Finds a symbol's definition and all its call sites in a single query. Use for refactoring, impact analysis, rename planning, and dead-code detection.

Instructions

Atomic symbol definition + every usage in one call. Prefer this over the two-step Grep-based find-all-callers pattern (grep -rn X then filter to call sites by eye) and over chaining search_code(symbols=true) + search_code()find_references returns both the definition and all call sites in a single call, complete with no follow-up searches needed.

Use this for: "find all callers of X" (the most common agent refactoring task); impact analysis before changing a function or class; rename planning; dead-code detection before deleting a function.

By default, matches inside string literals and comments are excluded (so test fixtures and doc comments don't drown out real call sites); pass include_strings: true to restore all occurrences. Returns {definition, references, total_references, pagination, status} where definition is the first symbol definition ({path, line, kind, symbol, span, preview}) or null, and references is a flat array of {path, line, preview} covering every textual occurrence including the definition site itself. Pagination applies to references only; if pagination.has_more is true, fetch the next page with offset. On "Index not found" / "stale" error, call index_project, then retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.)
modeNoResponse mode: "list" (default) returns full results with definition + references; "count" returns only {count, pattern} — faster, skips match body serialization.
forceNoForce execution of potentially expensive queries (bypasses broad query detection)
limitNoMax references per page (default: 200, max: 500). The 200-result default covers most find-all tasks in a single call. Pagination applies to references only.
offsetNoPagination offset for references (skip first N). Use with limit.
excludeNoExclude files matching glob patterns (e.g., ['target/**', 'tests/**'])
patternYesSymbol name or text pattern to find references for (e.g., 'CacheManager', 'extract_symbols')
include_stringsNoInclude matches inside string literals and comments (default: false). By default these are excluded to focus on real call sites.
Behavior5/5

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

No annotations provided, but the description fully discloses default behavior (excludes strings/comments), response structure, pagination details, and error handling (call index_project on stale index). This compensates for missing annotations.

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?

The description is well-structured and front-loaded with purpose, but slightly verbose. Every sentence adds value, though it could be tightened without losing clarity.

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?

Given the tool's complexity (10 parameters, no output schema), the description covers return structure, pagination, and error recovery comprehensively. It leaves little ambiguity for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, yet the description adds meaningful context beyond schema: e.g., default limit covers most tasks in one call, mode shortcuts, and include_strings semantics. It enhances understanding without redundancy.

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's purpose: 'Atomic symbol definition + every usage in one call.' It distinguishes from sibling tools like grep-based patterns and chaining search_code, making the value proposition explicit.

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?

Explicit usage guidance is provided: 'Use this for: find all callers of X, impact analysis, rename planning, dead-code detection.' It also contrasts with alternative patterns, offering clear when-to-use recommendations.

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