Skip to main content
Glama
VMexicano
by VMexicano

filtered_grep

Search for regex patterns in a directory, with results grouped by file or match and deduplicated; uses ripgrep for efficiency.

Instructions

Search for regex patterns in a directory with results grouped by file or match, deduplicated with [×N] prefix. Uses ripgrep when available, falls back to native recursive search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory path to search in (required)
excludeNoGlob pattern for files/dirs to exclude (default: node_modules,dist,.git)
includeNoGlob pattern for files to include (default: *)
patternYesRegex pattern to search for (required)
group_byNoGroup results by file or by match content (default: file)
max_resultsNoMaximum number of results to return (default: 20)
context_linesNoNumber of context lines around each match (default: 2)
Behavior4/5

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

With no annotations, the description carries the burden. It clearly discloses deduplication with '[×N] prefix', grouping behavior, and fallback mechanism from ripgrep to native search. This goes beyond basic tool purpose. However, it does not mention potential performance implications, permissions needed, or encoding/error handling.

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?

Two concise sentences with no wasted words. The first sentence front-loads the core action and key features. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters and no output schema, the description explains grouping and deduplication but does not detail the return format (e.g., structure of results, how file paths are presented). It also omits default parameter behaviors for exclude/include/max_results/context_lines beyond the schema. Adequate but has gaps for a complex 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 coverage is 100% with descriptions for all 7 parameters. The description adds meaning beyond schema by explaining deduplication and grouping, which relates to the 'group_by' and 'pattern' parameters. However, it does not add specific details about each parameter (e.g., what 'exclude' globs are defaulted). Baseline 3 is appropriate due to high schema coverage.

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 'Search for regex patterns in a directory' with specific verb ('Search') and resource ('regex patterns in a directory'). It adds distinctive behaviors: grouping, deduplication, and fallback to ripgrep. Sibling tools like filtered_read and filtered_shell have different purposes, making this tool distinct.

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?

The description does not explicitly state when to use this tool over alternatives. It implies usage for regex searching but offers no guidance on when not to use it or comparisons with sibling tools like filtered_read or filtered_shell. However, the context of sibling tools suggests the purpose is clear enough.

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/VMexicano/token-filter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server