Skip to main content
Glama
AllenComm
by AllenComm

docgrep

Search binary document files (PDF, DOCX, PPTX, XLSX, ODT, ODS, ODP, RTF, EPUB) for lines matching a regex pattern. Returns file path, section, and matching line.

Instructions

Search through document files (PDF, DOCX, PPTX, XLSX, ODT, ODS, ODP, RTF, EPUB) for text matching a regex pattern. Returns grep-like output: filepath:section:matching_line

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesPython regex pattern to match against line content.
directoryYesPath to the directory to search. Searched recursively, skipping hidden directories.
file_typesNoLimit to specific file types, with or without dots (e.g. ['pdf', 'docx']). Defaults to all supported types.
max_resultsNoMaximum number of matching lines to return.
case_sensitiveNoUse case-sensitive matching. Default is case-insensitive.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 recursive search, skipping hidden directories, default case-insensitivity, max results limit, and output format. However, it does not explicitly state that the tool is read-only or discuss performance implications for large searches.

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 a single sentence with an additional sentence for output format, both front-loaded and to the point. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description covers input, behavior, and output format adequately. For a search tool with five parameters, it is complete and leaves no major gaps.

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 baseline is 3. The description adds little beyond the schema: it repeats that the pattern is a Python regex and mentions recursive search, which is already in the directory parameter description.

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 the tool searches document files for text matching a regex pattern, listing supported file types and output format. It distinguishes from the sibling tool 'docread' by specifying the search functionality.

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 description provides clear context for when to use the tool (searching documents for patterns) but does not explicitly state when not to use it or mention alternatives. The sibling 'docread' is implied for reading files, but no comparative guidance is given.

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/AllenComm/mcp-docsearch'

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