Skip to main content
Glama

grep_search

Find text or regex matches across project files using pure Node.js; skips binaries and cache directories and returns each match as path:line:content.

Instructions

Search text or regex across project files using pure Node.js (zero external rg dependency, skips binaries and cache dirs). Returns 'path:line:content'.

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": {
      "rootDir": "<rootDir>",
      "query": "<query>"
    },
    "name": "grep_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesText or regex pattern to find
isRegexNo
rootDirYesAbsolute root directory to search
fileGlobNo*
maxResultsNo
excludeDirsNo
caseSensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It does add useful traits (pure Node.js, skips binaries and cache dirs, output format), but says nothing about permissions, regex flavor or multiline behavior, encoding, symlink handling, or error/empty-result behavior for a tool with seven options.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the core action and followed by the return format. The 'zero external rg dependency' parenthetical is mildly promotional but does convey a behavioral trait, so there is little waste.

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

Completeness2/5

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

For a seven-parameter search tool with no annotations, no output schema, and low schema coverage, the description should explain the filtering and regex options. Instead it only covers the basic action and return format, leaving most configuration semantics unexplained.

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 only 29%, so most parameters (isRegex, fileGlob, maxResults, excludeDirs, caseSensitive) are undocumented. The description only loosely gestures at isRegex via 'text or regex' and at excludeDirs via 'skips binaries and cache dirs'; it never clarifies glob syntax, result caps, or case-sensitivity defaults.

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?

The description states a specific verb and resource (search text or regex across project files) and even specifies the return shape 'path:line:content'. It does not differentiate itself from plausible siblings such as batch_search or find_files, so an agent cannot tell from this text alone why it should pick grep_search over those.

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?

No when-to-use or when-not-to-use guidance is given, and no alternative tool is named. The only implied usage is 'search for text', which leaves the agent to guess whether batch_search or find_files is more appropriate for a given task.

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