Skip to main content
Glama
duplonicus
by duplonicus

search

Read-only

Find matching lines in files using a regex pattern. Returns file:line: text for each match.

Instructions

Search file contents with a regular expression. Returns 'file:line: text' for each match.

pattern: a Python regular expression. path: a folder or a single file; empty means the first root. Narrow it: ~/dev is large. glob: only search files whose relative path matches this glob, e.g. '*.md'. ignore_case: match regardless of case. max_results: stop after this many matching lines.

Input Schema

NameRequiredDescriptionDefault
globNo
pathNo
patternYes
ignore_caseNo
max_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered structurally. The description adds the match-line output format and max_results truncation behavior, but says nothing about recursion depth, performance cost beyond the 'large' aside, or error behavior on bad regex.

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?

Purpose and return format are front-loaded in the first two sentences, followed by a compact per-parameter list. Nothing is padded, though the parameter block reads as a flat enumeration rather than prioritized guidance.

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?

An output schema exists so return values need no explanation, and all five params are addressed. Defaults (max_results=100, empty path) are only partially surfaced in prose, leaving minor gaps for a 5-param search tool.

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 description coverage is 0%, so the description must carry the load, and it documents all five parameters. It adds genuinely useful non-obvious semantics ('empty means the first root', glob matches relative path), though a couple entries (ignore_case) are near-tautological restatements.

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 (Search), resource (file contents), and mechanism (regular expression), and even specifies the return shape ('file:line: text'). 'File contents' cleanly distinguishes it from the sibling find_files (name-based) without needing to name it.

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?

Offers an implicit scoping hint ('Narrow it: ~/dev is large') and explains what each filter does, but never states when to reach for this tool versus find_files or read_file, nor any exclusions. Usage is implied rather than directed.

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