Skip to main content
Glama
reflex-search

Reflex

Official

list_locations

Locate every occurrence of a text pattern across files, returning each match as {path, line}. Optionally include a trimmed preview of the matching line.

Instructions

Where does X occur? Every match as {path, line}: the cheapest search, no limit. preview:true adds each matching line (trimmed, 120 chars). Same matching as search_code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoOnly paths containing this substring
globNoOnly paths matching (gitignore rules)
langNoLanguage filter: rust, python, typescript, text, …
forceNoRun a pattern too broad to run by default
excludeNoSkip paths matching (gitignore rules)
patternYesText to find
previewNoAdd each matching line (120 chars)
containsNoSubstring match (grep -F) instead of whole identifiers
ignore_caseNoCase-insensitive (rg -i)
dependenciesNoAttach each file's imports
include_locksNoAlso search lock files
include_generatedNoAlso search generated files

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv2.0.3
    • changedInput schema / properties / contains / description
      Previous value: -"Substring matching, like `grep -F`. DEFAULT IS FALSE, which matches WHOLE IDENTIFIERS ONLY: pattern \"verify_csrf\" does NOT match \"verify_csrf_form_field\", and \"jwks_rps\" does NOT match \"jwks_rps_limit\". Pass true to find a pattern anywhere inside a longer identifier. If a search returns 0, check the response `hint` — it reports how many substring matches exist."New value: +"Substring match (grep -F) instead of whole identifiers"
    • changedInput schema / properties / dependencies / description
      Previous value: -"Include dependency information (imports) in results. Only extracts static imports."New value: +"Attach each file's imports"
    • changedInput schema / properties / exclude / description
      Previous value: -"Exclude files matching patterns (e.g., ['vendor/**', 'tests/**']) Patterns follow gitignore rules: a pattern containing '/' (src/**/*.rs) is anchored at the index root; a bare name (*.rs, Makefile) matches at any depth; **/src/**/*.rs matches src/ anywhere; * does not cross /."New value: +"Skip paths matching (gitignore rules)"
    • changedInput schema / properties / file / description
      Previous value: -"Filter by file path substring (e.g., 'Controllers')"New value: +"Only paths containing this substring"
    • changedInput schema / properties / force / description
      Previous value: -"Force execution of potentially expensive queries (bypasses broad query detection)"New value: +"Run a pattern too broad to run by default"
    • changedInput schema / properties / glob / description
      Previous value: -"Include files matching patterns (e.g., ['app/**/*.php']) Patterns follow gitignore rules: a pattern containing '/' (src/**/*.rs) is anchored at the index root; a bare name (*.rs, Makefile) matches at any depth; **/src/**/*.rs matches src/ anywhere; * does not cross /."New value: +"Only paths matching (gitignore rules)"
    • changedInput schema / properties / ignore_case / description
      Previous value: -"Match letters regardless of case, like `rg -i` (`ignore_case` + `contains` is `rg -i -F`). Default false. The trigram index is still used, so this costs about the same as a case-sensitive search."New value: +"Case-insensitive (rg -i)"
    • changedInput schema / properties / include_generated / description
      Previous value: -"Also search generated files by name (*.pb.go, *.min.js, *.min.css, *.map, *_generated.*). Indexed but left out unless asked for; `lang: \"generated\"` selects them alone. Default false."New value: +"Also search generated files"
    • changedInput schema / properties / include_locks / description
      Previous value: -"Also search lock files (Cargo.lock, package-lock.json, *.lock, go.sum). They are indexed but left out unless asked for; `lang: \"lock\"` selects them alone. Default false."New value: +"Also search lock files"
    • changedInput schema / properties / lang / description
      Previous value: -"Filter by language: rust, typescript, javascript, go, java, php, kotlin, python, c, cpp, csharp, ruby, vue, svelte, zig — or \"text\" for the plain-text tier (every other non-binary file: docs, config, templates, extensionless), \"lock\" for lock files, \"generated\" for generated files (the last two are excluded unless named or include_locks / include_generated is set)."New value: +"Language filter: rust, python, typescript, text, …"
    • changedInput schema / properties / pattern / description
      Previous value: -"Search pattern (text to find)"New value: +"Text to find"
    • addedInput schema / properties / preview
      Added value: +{
      +  "description": "Add each matching line (120 chars)",
      +  "type": "boolean"
      +}
  2. Changed7 schema fields changedv2.0.1
    • addedInput schema / properties / contains
      Added value: +{
      +  "description": "Substring matching, like `grep -F`. DEFAULT IS FALSE, which matches WHOLE IDENTIFIERS ONLY: pattern \"verify_csrf\" does NOT match \"verify_csrf_form_field\", and \"jwks_rps\" does NOT match \"jwks_rps_limit\". Pass true to find a pattern anywhere inside a longer identifier. If a search returns 0, check the response `hint` — it reports how many substring matches exist.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / exclude / description
      Previous value: -"Exclude files matching patterns (e.g., ['vendor/**', 'tests/**'])"New value: +"Exclude files matching patterns (e.g., ['vendor/**', 'tests/**']) Patterns follow gitignore rules: a pattern containing '/' (src/**/*.rs) is anchored at the index root; a bare name (*.rs, Makefile) matches at any depth; **/src/**/*.rs matches src/ anywhere; * does not cross /."
    • changedInput schema / properties / glob / description
      Previous value: -"Include files matching patterns (e.g., ['app/**/*.php'])"New value: +"Include files matching patterns (e.g., ['app/**/*.php']) Patterns follow gitignore rules: a pattern containing '/' (src/**/*.rs) is anchored at the index root; a bare name (*.rs, Makefile) matches at any depth; **/src/**/*.rs matches src/ anywhere; * does not cross /."
    • addedInput schema / properties / ignore_case
      Added value: +{
      +  "description": "Match letters regardless of case, like `rg -i` (`ignore_case` + `contains` is `rg -i -F`). Default false. The trigram index is still used, so this costs about the same as a case-sensitive search.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_generated
      Added value: +{
      +  "description": "Also search generated files by name (*.pb.go, *.min.js, *.min.css, *.map, *_generated.*). Indexed but left out unless asked for; `lang: \"generated\"` selects them alone. Default false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_locks
      Added value: +{
      +  "description": "Also search lock files (Cargo.lock, package-lock.json, *.lock, go.sum). They are indexed but left out unless asked for; `lang: \"lock\"` selects them alone. Default false.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / lang / description
      Previous value: -"Filter by language (php, rust, typescript, python, etc.)"New value: +"Filter by language: rust, typescript, javascript, go, java, php, kotlin, python, c, cpp, csharp, ruby, vue, svelte, zig — or \"text\" for the plain-text tier (every other non-binary file: docs, config, templates, extensionless), \"lock\" for lock files, \"generated\" for generated files (the last two are excluded unless named or include_locks / include_generated is set)."
  3. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose key traits: unbounded result set ('no limit'), the return shape {path, line}, and preview's trimming to 120 chars. It omits ordering, permissions, and broad-pattern guarding, but covers the main behavioral surprises.

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?

Three compact clauses, front-loaded with the core question and result shape, then preview behavior, then matching semantics. No filler.

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?

For a 12-parameter search tool with a fully documented schema and no output schema, the description supplies what the schema cannot: the result shape and the 'no limit' behavior. It doesn't attempt to summarize the many filter parameters, but the schema handles those.

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 the baseline is 3; every parameter including preview is already documented in the schema. The description adds only marginal detail ('trimmed, 120 chars') beyond the schema's own preview text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific operation (find every occurrence of a pattern) and its output shape {path, line}. 'The cheapest search, no limit' plus 'Same matching as search_code' gives some sibling differentiation against search_code/search_regex, though the misleading tool name list_locations isn't explicitly reconciled.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage via 'the cheapest search, no limit', suggesting it's the go-to for exhaustive cheap matching. It references search_code for matching semantics but never states when NOT to use it or which sibling to prefer for regex/AST/reference searches.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.