Skip to main content
Glama

grep

Read-onlyIdempotent

Search file contents with regex patterns and return path:line text matches, skipping git-ignored files by default. Use it to find code or text matches and page results with offset.

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.2.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds real behavior: the exact output format, that git-ignored files plus .git, node_modules and .venv are skipped, the respect_gitignore=false override, and offset-based paging. It does not mention that results are capped by max_results, which is the main remaining behavioral gap.

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 tight sentences with zero filler; the core action and return format come first, then filtering caveats, then pagination. Every clause carries information.

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?

For a 7-parameter tool with 0% schema coverage, the description is only partially sufficient — half the parameters (file_glob, ignore_case, max_results) have no explanation anywhere. An output schema exists, so omitting return-value detail is fine, though the inline format note is a bonus.

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 description coverage is 0%, so the description carries the full burden, and it only explains three of the seven parameters (pattern as regex, offset for paging, respect_gitignore and its skip list). file_glob, ignore_case, max_results and path semantics are left entirely undocumented.

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 and resource ('Regex search file contents') and immediately gives the return shape ('path:line: text matches'). It implicitly separates itself from glob (filename matching) and read_text_file, but never names a sibling explicitly.

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?

Usage context is implied rather than stated: the gitignore note and 'use offset to page' tell the agent how to operate once it has chosen the tool, but there is no explicit when-to-use or when-to-prefer-glob/search_workspace_text guidance.

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