Skip to main content
Glama

Search regex (ripgrep)

search_regex
Read-only

Use regex patterns to search a Markdown vault. Get ranked, highlighted matches with glob-filtered file scope.

Instructions

Regex search via ripgrep. Returns ranked sandbox-wrapped match lines with term highlighting, resolved to indexed chunks. Restrict file scope with glob (e.g. '*.md'). Requires datacron index for chunk resolution. Without rg on PATH it falls back to scanning indexed chunk bodies, which is slower and sees only indexed content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNo
limitNo
patternYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses the fallback to scanning indexed chunk bodies when rg is missing, notes the slower performance and limited visibility, and explains the dependency on 'datacron index'. This adds substantial behavioral context that annotations do not capture.

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?

The description is tight and front-loaded: it states the core function in the first sentence, then adds scope control, prerequisites, and fallback behavior in two more sentences. No redundant phrasing or 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?

Given an output schema exists, the return format is already documented. The description covers the glob parameter, the prerequisite index, and the fallback path. The only gap is the lack of explanation for the 'limit' parameter, which is minor but still leaves the agent guessing about its effect. Overall, it is nearly complete for a read-only search tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must explain all parameters. It explicitly explains glob ('Restrict file scope with glob') but does not mention 'limit' at all, and only implies 'pattern' as the regex. With three parameters, two of them (pattern and limit) lack explicit explanation, leaving the agent to infer semantics.

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 it is a regex search tool using ripgrep, returning ranked match lines with highlighting and chunk resolution. It is specific about the resource (regex search) and the mechanism (ripgrep), making it distinct from sibling search_text which likely handles plain-text search.

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

Usage Guidelines4/5

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

Provides clear usage context: how to restrict scope with glob (e.g., '*.md'), the prerequisite of 'datacron index' for chunk resolution, and a fallback behavior when rg is absent. However, it does not explicitly contrast with search_text or state when not to use it, so it stops short of a full when/when-not guidance.

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