Skip to main content
Glama

pdf_search_batch

Search multiple PDFs in a directory for a keyword or regex, filtered by a filename pattern. Returns matching pages up to a set limit, with optional case-sensitive matching.

Instructions

Search across multiple PDF files in a directory matching a pattern (e.g. '.pdf', 'L.pdf') for a keyword or regex.

Input Schema

NameRequiredDescriptionDefault
queryNoKeyword or regex to search for in page content.
patternNoFilename glob pattern (default: '*.pdf').*.pdf
directoryYesDirectory path containing the PDF files.
max_resultsNoMaximum number of page matches to return (default: 100).
case_sensitiveNoWhether the search should be case sensitive (default: false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the behavioral burden. It does not disclose whether subdirectories are searched recursively, which regex flavor is supported, how matches are returned, or whether max_results truncates across files or pages, leaving key operational behavior unspecified.

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 well-structured sentence with no redundant wording, and the core action and scope are front-loaded.

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

Completeness3/5

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

The schema fully documents parameters, but the tool has no output schema and the description does not explain the return format or recursive-search behavior. For a five-parameter batch search tool, this leaves meaningful gaps despite the concise and clear core statement.

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 documents all five parameters including defaults and meanings. The description adds only illustrative glob examples like '*.pdf' and 'L*.pdf', which is marginal value beyond the schema.

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?

The description states a specific verb and resource: search across multiple PDF files in a directory, filtered by a filename pattern, for a keyword or regex. It implicitly distinguishes itself from single-file siblings like pdf_read_text by emphasizing batch search, but it does not explicitly name or differentiate from those alternatives.

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?

The batch-search scope implies when to use this tool, but there is no explicit guidance on when to choose it over pdf_read_text or pdf_get_metadata, nor any stated exclusions or prerequisites. The usage context is inferable rather than documented.

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