Reflex
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_locationsA | 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:
Workflow:
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}] |
| count_occurrencesA | Quick statistics - count how many times a pattern occurs. Purpose: Get total occurrence count and file count without loading any content. Use this when:
Returns: {total: count, files: count, pattern: string} Supports: All filters (lang, file, glob, exclude, symbols) 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 output: {"total": 87, "files": 12, "pattern": "CourtCase"} |
| search_codeA | Full-text or symbol-only code search with detailed results. When to use search_regex instead:
Search modes:
Use this for:
Pagination: Check response.pagination.has_more. If true, use offset parameter to fetch next page. 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. |
| search_regexA | Regex-based code search for complex pattern matching (e.g., 'fn (get|set)_\w+'). Use for:
Common examples:
Escaping rules:
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. Don't use for:
|
| search_astA | ⚠️ ADVANCED USERS ONLY - DO NOT USE UNLESS ABSOLUTELY NECESSARY ⚠️ Structure-aware code search using Tree-sitter AST patterns (S-expressions). PERFORMANCE WARNING: AST queries bypass trigram optimization and scan the ENTIRE codebase (500ms-10s+). WHEN TO USE (RARE):
IN 95% OF CASES, USE search_code with symbols=true INSTEAD (10-100x faster). REQUIRED: You MUST use glob patterns to limit scope (e.g., glob=['src/**/*.rs']) to avoid scanning thousands of files. Token efficiency: Previews are auto-truncated to ~100 chars. Use limit parameter to control result count. 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 AST patterns:
Refer to Tree-sitter documentation for each language's grammar. |
| index_projectA | Rebuild or update the code search index. Run this when:
Modes:
|
| get_dependenciesA | Get all dependencies (imports) of a specific file. Purpose: Analyze what modules/files a given file imports. Returns: Array of dependency objects with import path, line number, type (internal/external/stdlib), and optional symbols. Use this when:
IMPORTANT: Only extracts static imports (string literals). Dynamic imports (variables, template literals, expressions) are automatically filtered by tree-sitter query design. See CLAUDE.md section "Dependency/Import Extraction" for details. Note: Path matching is fuzzy - supports exact paths, fragments, or just filenames. |
| get_dependentsA | Get all files that depend on (import) a specific file. Purpose: Find what other files import this file (reverse dependency lookup). Returns: Array of file paths that import the specified file. Use this when:
IMPORTANT: Only considers static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details. Note: Path matching is fuzzy - supports exact paths, fragments, or just filenames. |
| get_transitive_depsA | Get transitive dependencies of a file up to a specified depth. Purpose: Find not just direct dependencies, but dependencies of dependencies (the full dependency tree). Returns: Object mapping file IDs to their depth in the dependency tree. Use this when:
IMPORTANT: Only follows static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details. Example: depth=2 finds: file → deps → deps of deps |
| find_hotspotsA | Find the most-imported files in the codebase (dependency hotspots). Purpose: Identify files that many other files depend on. Pagination: Default limit of 200 results per page. Check response.pagination.has_more to fetch more pages. Sorting: Default order is descending (most imports first). Use sort parameter to change. Returns: Object with pagination metadata and array of {path, import_count} objects sorted by import count. Use this when:
IMPORTANT: Only counts static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details. Example output: {"pagination": {...}, "results": [{"path": "src/models.rs", "import_count": 27}]} |
| find_circularA | Detect circular dependencies in the codebase. Purpose: Find dependency cycles (A → B → C → A). Pagination: Default limit of 200 results per page. Check response.pagination.has_more to fetch more pages. Sorting: Default order is descending (longest cycles first). Use sort parameter to change. Returns: Object with pagination metadata and array of cycles, where each cycle is an array of file paths forming the circular path. Use this when:
IMPORTANT: Only detects cycles in static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details. Note: Circular dependencies can cause compilation issues and indicate architectural problems. Example output: {"pagination": {...}, "results": [{"paths": ["a.rs", "b.rs", "a.rs"]}]} |
| find_unusedA | Find unused files that no other files import. Purpose: Identify orphaned files that could be safely removed. Pagination: Default limit of 200 results per page. Check response.pagination.has_more to fetch more pages. Returns: Object with pagination metadata and flat array of file path strings (no wrapping objects). Use this when:
Note: Entry points (main.rs, index.ts) will appear as unused but should not be deleted. Example output: {"pagination": {...}, "results": ["src/unused.rs", "tests/old.rs"]} |
| find_islandsA | Find disconnected components (islands) in the dependency graph. Purpose: Identify groups of files that are isolated from the rest of the codebase (no dependencies between groups). Pagination: Default limit of 200 results per page. Check response.pagination.has_more to fetch more pages. Sorting: Default order is descending (largest islands first). Use sort parameter to change. Returns: Object with pagination metadata and array of islands, where each island contains multiple file paths that depend on each other. Use this when:
IMPORTANT: Only considers static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details. Size filtering: Use min_island_size and max_island_size to filter by component size. Default: 2-500 files (or 50% of total files). Example output: {"pagination": {...}, "results": [{"island_id": 1, "size": 5, "paths": ["a.rs", "b.rs", "c.rs", "d.rs", "e.rs"]}]} |
| analyze_summaryA | Get a summary of all dependency analyses. Purpose: Quick overview of codebase dependency health. Returns: Object with counts: {circular_dependencies, hotspots, unused_files, islands, min_dependents} Use this when:
IMPORTANT: Only considers static imports (string literals). Dynamic imports are filtered. See CLAUDE.md section "Dependency/Import Extraction" for details. Example output: {"circular_dependencies": 17, "hotspots": 10, "unused_files": 82, "islands": 81, "min_dependents": 2} |
| find_referencesA | 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:
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. |
| gather_contextA | Collects comprehensive codebase information. Parameters:
When to use:
When NOT to use:
Note: By default (no parameters), all context types are gathered. |
| check_index_statusA | Check whether the Reflex search index is fresh, stale, or missing — without running any search. CALL THIS FIRST at the start of every session and before any significant search task. If the index is stale or missing, call index_project before searching. Returns:
When to call:
Example fresh response: |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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