Skip to main content
Glama

grep

Search file contents with regex patterns and return path:line text matches; skips git-ignored, .git, node_modules, and .venv files by default.

Instructions

Regex search file contents. Returns path:line: text matches. Skips git-ignored files (and .git, node_modules, .venv) unless respect_gitignore=false. Use offset to page.

Input Schema

NameRequiredDescriptionDefault
pathNo.
offsetNo
patternYes
file_globNo*
ignore_caseNo
max_resultsNo
respect_gitignoreNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return format (path:line: text), the default exclusion set (.git, node_modules, .venv, git-ignored files) and the respect_gitignore=false override, plus paging via offset. It omits the regex flavor, multiline behavior, and what happens when max_results truncates output.

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?

Four short sentences, front-loaded with the core action and return shape, then filtering caveats, then paging. Nothing is repeated and nothing is padding.

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?

An output schema exists so return values needn't be explained, and the filtering/paging behavior is covered. For a 7-parameter tool with zero schema documentation, though, an agent still cannot predict the effect of max_results, file_glob, or ignore_case from the description.

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 0%, so the description must compensate for 7 parameters, and it only covers about half: pattern (regex), path, offset (paging), and respect_gitignore (explicit). file_glob, ignore_case, and max_results (default 200, a silent result cap) get no explanation anywhere.

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?

States a specific verb+resource ('Regex search file contents') that cleanly separates it from glob (filenames) and read_file (whole-file reads). The return shape is disclosed up front. It never names the sibling it competes with, so differentiation is implied rather than explicit.

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?

'Use offset to page' gives one operational hint, and the gitignore sentence tells an agent when results will be unexpectedly filtered. There is no when-to-use/when-not guidance relative to glob, read_file, or query_data, which the agent must infer.

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