Skip to main content
Glama

grep

Search a stored source or the whole corpus by regular expression when URL is omitted; returns matches with character offsets, capped for size.

Instructions

Query a stored source, or the whole corpus when url is omitted, with a regular expression. Returns matches with character offsets; results are capped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
patternYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that matches include character offsets and that results are capped, which is real behavioral detail. It is silent on error behavior for invalid regexes, permissions, and how the cap is applied or what happens when it is hit.

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 sentences, front-loaded with the core action and scoping rule, no filler. Every clause adds information the schema does not carry.

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

Completeness5/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 need not be re-explained beyond the offsets and cap note. For a 2-parameter read tool, the description covers the search target, scoping default, input type, and result shape – enough for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must supply meaning, and it does: it explains that `url` selects a single stored source and that omitting it targets the whole corpus, and that `pattern` is a regular expression. It stops short of clarifying the expected format of `url` (URL vs. identifier) and does not describe the default semantics more deeply.

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: querying a stored source or the whole corpus via regular expression, plus the url-omission scoping rule. It does not explicitly differentiate itself from regex-adjacent siblings like search or corpus_search, so an agent must infer the boundary.

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 gives one implied usage rule – omit `url` to search the whole corpus – which is genuinely useful context. However, it never says when to prefer grep over `search` or `corpus_search`, nor when-not to use it, leaving alternative selection to inference.

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

Deploy Server

Other Tools