Skip to main content
Glama

pdf_search

Read-onlyIdempotent

Search text in a PDF and view matches with surrounding context and page numbers. Supports case-sensitive and page range options.

Instructions

Search text across a PDF and return matches with a short surrounding snippet and the page number. The query is matched as a literal substring (case-insensitive by default). Searches all pages unless a range is given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the PDF file
queryYesLiteral text to find (matched as a substring)
caseSensitiveNoMatch case exactly. Defaults to false.
pagesNoPage range, e.g. '1-5'. Defaults to all pages.
Behavior5/5

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

The description adds value beyond annotations by revealing search behavior: literal substring matching, default case-insensitivity, and return format (snippet and page number). Annotations already indicate safe, read-only, idempotent operation, and the description complements this without contradiction.

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?

Two sentences that front-load the main action and key behaviors. Every sentence adds value, no redundancy or filler.

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?

The description adequately covers the tool's functionality for a simple search operation with 4 parameters. It lacks detail on snippet length or formatting, but given the straightforward nature, it is reasonably complete.

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 coverage is 100%, and the description reiterates parameter details (case-insensitive default, page range). However, it adds context about return values (snippet and page number), which is not in the schema, enhancing understanding despite no output schema.

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 verb 'search' and resource 'PDF', specifying that it returns matches with a snippet and page number. It distinguishes from siblings like pdf_extract_text (which extracts all text) and pdf_to_markdown (which converts format), focusing on targeted search.

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 implies usage for finding specific text in a PDF, including case-insensitivity and page range, but does not explicitly state when to avoid this tool or mention alternatives like pdf_extract_text for extracting all text. The guidance is clear but lacks exclusionary context.

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/AryanBV/pdf-toolkit-mcp'

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