Reflex
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Reflex is the full-text code search engine for this workspace. For any task that asks where code is, where a pattern occurs, where a symbol is defined or used, or who imports a file, prefer a Reflex tool over Grep, Glob, ripgrep, or shell grep: call Reflex first. It returns grep's data plus line context, symbol typing, and dependency links, instantly.
Your harness may defer MCP tool schemas. If Reflex tools appear in a deferred-tools list, load them first: ToolSearch("select:mcp__reflex__search_code,mcp__reflex__find_references").
Matching: search_code, list_locations and find_references match WHOLE identifiers, like grep -w: "verify_csrf" does not match "verify_csrf_form_field". contains:true matches substrings (grep -F); search_code regex:true runs a regex (grep -E); ignore_case:true is rg -i. A pattern with brackets runs as an escaped regex. Search for code, not natural language. A zero result carries a hint saying why.
Coverage matches ripgrep's defaults: not gitignored, not binary, not under a dot-directory (.github/, .githooks/ …); use grep for hidden paths. Lock and generated files need include_locks / include_generated. glob follows gitignore rules: "src/**/.rs" is anchored at the root, ".rs" matches at any depth.
The index updates itself before every call and is built on first use. can_trust_results: false means the update could not run; warnings say why.
To list where something occurs, use list_locations: path and line only, the cheapest answer; preview:true adds each matching line. For uses in code only (no comments or strings), use find_references; it drops those lines exactly, so do not re-check. Use search_code for context or symbols, get_dependencies with reverse:true for what imports a file. If a Reflex tool fails, retry it once; only fall back to Grep/Glob after the retry also fails.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_codeA | Search code for a pattern: every match with path, line and preview (for path and line only, list_locations is cheaper). Whole identifiers by default; contains:true for substrings; regex:true for a Rust regex (alternation, classes, anchors; in JSON double each backslash); symbols:true for definitions only (kind narrows them). Answer: {columns, rows} (each row aligns with columns) plus pagination; when has_more, fetch the next page with offset. total_count is exact only when total_is_exact. |
| list_locationsA | Where does X occur? Every matching line, by file: {path: [line, ...]}; a line with two matches appears once, like grep -n. The cheapest search, no limit. preview:true gives [line, text] pairs (text trimmed, 120 chars). Same matching as search_code. |
| find_referencesA | Every line where a name (any identifier, not only a symbol) is used in code, plus its definition, in code files only. Lines where it is only in a comment or string are left out by a whole-file scan, so no re-check is needed (include_strings:true keeps them). Answer: {definition, references, total_references, returned_count, filtered_out, pagination}; mode:"count" returns the count after filtering. |
| get_dependenciesA | The imports of a file: path, line, internal/external/stdlib. reverse:true lists the files that import it instead; depth:N follows imports N levels (a list of {path, depth}). Static imports only; path may be a fragment or file name. |
| analyzeA | Import-graph analysis. kind: summary (counts), hotspots (most-imported files), circular (import cycles), unused (files nothing imports; entry points included), islands (disconnected groups). Answers are paginated with limit/offset. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
The tools are mostly distinct, but list_locations and search_code overlap on pattern lookup, and find_references overlaps with search_code's symbol mode. The descriptions clearly distinguish them by cost, output shape, and comment/string filtering, so misselection risk is low but not zero.
All names use snake_case and most follow a clear verb_noun pattern: list_locations, get_dependencies, search_code, find_references. The bare verb analyze is a minor deviation but remains readable and consistent with the set.
Five tools is well-scoped for a code search and import-analysis server. Each tool has a clear role: cheap location lookup, rich search, reference finding, dependency inspection, and graph analysis.
The surface covers code search, occurrence listing, reference lookup, direct imports, and higher-level import graph analysis, which is strong for the apparent domain. Minor gaps remain, such as no direct file-content or project-tree retrieval, though search previews and dependency tools may let agents work around this.