Skip to main content
Glama
reflex-search

Reflex

Official

list_locations

Discover file and line locations where a pattern appears without loading code content. Returns array of {path, line} objects for efficient exploration.

Instructions

Fast location discovery with minimal token usage.

Purpose: Find where a pattern occurs (file + line) without loading previews or detailed context.

Returns: Array of {path, line} objects - one per match location.

Use this when:

  • Starting exploration ("where is X used?")

  • Counting affected locations

  • Building a list for targeted Read operations

  • You need locations only, not code content

Workflow:

  1. Use list_locations to discover (cheap, returns locations only)

  2. Use Read tool or search_code on specific files if you need content (targeted)

Supports: lang, file, glob, exclude filters No limit: Returns ALL matching locations

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.

Example: Pattern "CourtCase" → [{"path": "app/Models/CourtCase.php", "line": 15}, {"path": "app/Http/Controllers/CourtController.php", "line": 42}]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dependenciesNoInclude dependency information (imports) in results. Only extracts static imports.
excludeNoExclude files matching patterns (e.g., ['vendor/**', 'tests/**'])
fileNoFilter by file path substring (e.g., 'Controllers')
forceNoForce execution of potentially expensive queries (bypasses broad query detection)
globNoInclude files matching patterns (e.g., ['app/**/*.php'])
langNoFilter by language (php, rust, typescript, python, etc.)
patternYesSearch pattern (text to find)
Behavior4/5

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

No annotations provided, but description covers token usage, return format, no limit, and index error handling. Absence of explicit read-only or non-destructive guarantee but context implies it.

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 sections: Purpose, Returns, Use when, Workflow, Supports, No limit, Error Handling, Example. Each sentence is meaningful and front-loaded.

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?

Fully explains behavior: returns all locations, supports multiple filters, has error recovery. Could mention token consumption details but sufficient for a location-discovery tool.

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 covers all parameters with descriptions; description lists supported filters (lang, file, glob, exclude) and explains pattern, adding minimal extra meaning beyond schema.

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?

Description explicitly states it finds where a pattern occurs (file + line) without loading previews, distinguishing it from sibling tools like search_code and count_occurrences.

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 clear use cases (exploration, counting, building list) and a workflow recommending subsequent Read/search_code for content. Also includes error handling with retry logic.

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