Skip to main content
Glama
yarenty

emperor-folder

search

Read-onlyIdempotent

Find regular expression matches in text files, returning each match's path, line number, and line; optionally limit by path or glob and ignore case.

Instructions

Search text files for a regular expression; returns path, line number and line for each match. Optional start path, glob filter, ignore_case.

Input Schema

NameRequiredDescriptionDefault
globNoGlob on paths as shown, e.g. "*.rs".
pathNoDirectory or file to search; omit for everything.
patternYesRegular expression (Rust regex syntax) matched against each line.
ignore_caseNoMatch case-insensitively (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior. The description adds useful return-format detail (path, line number, line per match) and scopes it to text files, but does not cover edge cases such as binary files, recursion, or hidden files.

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?

A single compact sentence front-loads the purpose, then return values, then optional parameters. Every clause earns its place and no filler is present.

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?

The tool is simple, the input schema is fully documented, annotations cover safety, and the description supplies the missing output format because no output schema exists. It is complete enough for correct invocation, though minor search-scope details could be richer.

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 100%, so the schema already explains all four parameters. The description merely repeats optional start path, glob filter, and ignore_case without adding syntax or behavioral nuance beyond the schema.

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?

States a specific verb and resource: search text files for a regular expression, and specifies the return shape. This distinguishes it from sibling tools like read and stat, which retrieve files or metadata rather than matching content.

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

Usage Guidelines4/5

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

Gives clear context for when to use it: searching text for a regex with optional path and glob narrowing. It does not explicitly name alternatives or when-not-to-use cases, but the distinction from read/list/stat is inferable from the purpose.

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