Skip to main content
Glama

batch_search

Read-only

Run up to 20 text, regex, glob, or read-only git searches in a single call to find matches across files and return consolidated results without repeated requests.

Instructions

Run 1-20 searches concurrently in one call: type text | regex | glob (list files) | git (read-only: status/diff/log/show/branch/rev-parse/ls-files/grep). Per query: path, glob filter, outputMode (content | files_with_matches | count), caseSensitive, contextLines, maxResults. Uses ripgrep when found on PATH, else a built-in Node scanner (skips .git, node_modules, dist and binary files). Output is capped by maxChars (<= 8800); overflow is spooled to a file.

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": {
      "queries": "<queries>"
    },
    "name": "batch_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoBase directory for relative paths (default: router cwd).
engineNoauto = ripgrep when found on PATH, else the built-in Node scanner.auto
queriesYes
maxCharsNoInline output cap (500..8800); overflow is spooled to a file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description adds substantial behavior beyond that: engine selection (ripgrep on PATH, else a built-in Node scanner), the skip list (.git, node_modules, dist, binary files), the 8800-char inline cap with overflow spooled to a file, and the read-only git subcommand whitelist. These are exactly the operational traits an agent needs before calling it.

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?

Front-loaded with the core capability and batch size, then the per-query knobs, then the engine/fallback behavior, then the output cap. Every clause carries distinct information and there is no filler or repetition.

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?

There is no output schema, so the description has to carry return behavior, and it does state the inline cap and that overflow is spooled to a file. It stops short of saying where spooled files land or what the per-query response shape looks like, which is a small but real gap for a tool returning 1-20 result sets.

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 coverage is 75%, so the baseline is 3. The description explains what each type does ('glob = list files', 'git = read-only git subcommand') and lists outputMode values, partially compensating for the schema's undocumented enum fields, but the per-query parameter list is largely a restatement of field names without new syntax or 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?

States a specific verb and resource ('Run 1-20 searches concurrently in one call') and enumerates the four search types (text/regex/glob/git) with the read-only git subcommands named. It is unmistakably a multi-search tool, though it never names or contrasts against a sibling, leaving that discrimination to the surrounding context.

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?

Usage is implied by the type enumeration and the '1-20' concurrency framing, so an agent can infer this is the tool for batching file searches. There is no explicit when-to-use/when-not-to-use statement, no guidance on choosing batching vs a single search, and no prerequisite or exclusion language.

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