Skip to main content
Glama

grep

Find exact strings or regex patterns in cached files, showing line numbers and surrounding context.

Instructions

Cache-only ripgrep: exact string/regex with line numbers.

Use search for semantic intent. Seed files with batch_read first; empty results often mean files not cached.

Args: pattern: Regex pattern, or a literal if fixed_string=true. path: Optional exact path, suffix, or glob filter. fixed_string: Treat pattern as a literal instead of regex. case_sensitive: Whether matching is case-sensitive. context_lines: Number of context lines to include around matches. max_matches: Maximum total matches across all files. max_files: Maximum number of files to return.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
pathNo
fixed_stringNo
case_sensitiveNo
context_linesNo
max_matchesNo
max_filesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNo
patternNo
pathNo
total_matchesNo
files_matchedNo
filesNo
truncated_matchesNo
truncated_filesNo
fixed_stringNo
case_sensitiveNo
context_linesNo
Behavior4/5

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

With no annotations, the description carries full burden. It discloses 'Cache-only' behavior, explains empty result cause, and describes parameters. However, it omits details like performance or side effects, though for a read-only tool these are less critical.

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?

The description is concise: a one-line summary, a usage note, and a parameter list. Every sentence adds value, and the key information is front-loaded.

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?

Given the 7 parameters, the description covers usage, parameters, and behavioral info. The output schema exists, so return values don't need description. It could briefly mention output format, but overall is quite complete.

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

Parameters5/5

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

Schema coverage is 0%, but the description provides a detailed docstring for each parameter (pattern, path, fixed_string, etc.), adding meaning beyond the bare schema definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Cache-only ripgrep: exact string/regex with line numbers,' specifying the verb (grep), resource (files), and distinguishing from the sibling 'search' tool which is for semantic intent.

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

Usage Guidelines5/5

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

Explicitly advises to use 'search' for semantic intent and to seed files with 'batch_read' first, explaining that empty results often mean files are not cached. This provides clear when-to-use and when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CoderDayton/semantic-cache-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server