Skip to main content
Glama

grep

Read-only

Search UTF-8 files using Python regular expressions and return matching lines while skipping binary, oversized, and unreadable files.

Instructions

Search UTF-8 files with a Python regular expression. Returns matching lines; skips binary, oversized, and unreadable files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "<pattern>"
    },
    "name": "grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
globNo
pathNo
limitNo
patternYes
ignore_caseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds real value with the skip behavior ('skips binary, oversized, and unreadable files') and UTF-8-only constraint, but says nothing about the 'limit' cap of 1000, ordering of results, or whether skipped files are reported.

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 compact sentences, front-loaded with the core action and followed by the return value and filtering behavior. Every clause carries information; nothing is padded.

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?

With no output schema, the description usefully tells the agent what a result looks like ('matching lines') and what gets skipped. Remaining gaps are parameter-level (path default, glob syntax, limit semantics, ignore_case), which the description does not cover.

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 all five parameters (glob, path, limit, pattern, ignore_case) carry no documentation in the schema. The description only partly compensates by clarifying that 'pattern' is a Python regex; path scoping, glob matching, ignore_case, and the limit behavior are all left unstated.

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 ('Search UTF-8 files with a Python regular expression') plus what it returns ('matching lines'). It is clearly distinguishable from file-finding siblings like glob or read, though it never names those siblings to reinforce the contrast.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not guidance and no reference to alternatives such as glob, read, bash, or python, even though content search is genuinely ambiguous among them. The purpose implies its use case, but the agent must infer routing on its own.

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