Skip to main content
Glama

search_in_archive

Search text inside archive members with a per-line regex without extracting files; use glob filters to narrow matches and skip binaries.

Instructions

Grep text members inside an archive without extracting it.

pattern is a Python regular expression, matched per line. glob narrows which members are searched. Binary members are skipped and counted; each member is read at most 5 MiB and the whole search at most 64 MiB, and the result says when a cap was hit. Output lines look like 'member/name:LINE: text'.

Input Schema

NameRequiredDescriptionDefault
globNo
pathYes
patternYes
encodingNo
passwordNo
ignore_caseNo
max_matchesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries real weight: it discloses that binary members are skipped and counted, the per-member 5 MiB and 64 MiB total read caps, and that the result reports when a cap was hit. It does not say how encrypted members behave when 'password' is omitted, nor whether a non-archive path raises an error, which are the remaining behavioral gaps.

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?

The core purpose is front-loaded in one short sentence, and the following sentences are each additive detail rather than filler. The cap sentence is slightly convoluted ('each member is read at most 5 MiB and the whole search at most 64 MiB') but still parses cleanly.

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, yet the description still gives the line format 'member/name:LINE: text' and the cap-notification signal, which is helpful surplus. For a 7-param search tool with no annotations, the main omission is any guidance on 'password' and 'encoding', which an agent would otherwise have to infer from parameter names.

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 0% across 7 parameters, so the description must compensate. It adds genuine meaning for 'pattern' (Python regex, per-line matching) and 'glob' (member selection), but says nothing about 'encoding', 'password', 'ignore_case', or 'max_matches', leaving four parameters undocumented anywhere.

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?

First sentence gives a concrete verb ('grep') and resource ('text members inside an archive') plus a defining constraint ('without extracting it'). That constraint alone distinguishes it from extract_archive and read_entry among the siblings.

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?

The phrase 'without extracting it' implicitly routes the agent away from extract_archive for content search, and 'glob narrows which members are searched' hints at scoping before reading. It stops short of naming an explicit alternative or exclusion, so it is clear context rather than full when/when-not guidance.

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