Skip to main content
Glama

search_pdf

Locate a phrase in a PDF and get every match with its page number and bounding-box coordinates. Supports case-sensitive searches.

Instructions

Search for a phrase in a PDF and return every matching text item with its page number and bounding-box coordinates.

Returns JSON: { "phrase", "match_count", "matches": [ { "page_num", "text", "x", "y", "width", "height", "font_size" } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phraseYesText phrase to search for.
pdf_pathYesAbsolute path to the PDF file.
case_sensitiveNoCase-sensitive match. Default false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full transparency burden. It discloses that the tool returns every matching text item with page number, coordinates, and font size, and gives an example JSON structure. This goes beyond a minimal 'searches a PDF' statement. However, it does not explicitly state whether the operation is read-only or describe error conditions, though those are not likely to be concerns for a search operation.

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 concise: two sentences plus a compact JSON return example. The primary purpose is front-loaded in the first sentence, and the JSON block adds value without unnecessary fluff. Every part earns its place, and the structure is easy to parse.

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 tool is simple (3 params, 2 required) and the description provides a detailed return format, which covers the essential behavioral context. It doesn't discuss edge cases like partial matches or pagination, but for a search tool, the description is sufficient for an agent to select and invoke it correctly. The lack of an explicit output schema is mitigated by the inline JSON example.

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?

The input schema already provides 100% coverage with descriptions for all three parameters (phrase, pdf_path, case_sensitive). The description does not add extra parameter semantics beyond referencing 'phrase' and 'PDF' in the prose. Since the schema covers the parameters, the baseline is 3, and the description doesn't elevate it.

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's function: 'Search for a phrase in a PDF and return every matching text item with its page number and bounding-box coordinates.' It specifies a precise verb ('search'), a resource ('PDF'), and the exact output (text items with coordinates), which distinguishes it from sibling tools like parse_pdf (full extraction) and screenshot_pdf (image capture).

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 description implies usage by stating it searches for a phrase, but it does not explicitly contrast this with alternatives like parse_pdf or screenshot_pdf. There is no 'use this when' or 'use X instead' guidance. Since the tool's purpose is self-evident and the siblings are contextually different, the usage is implied rather than explicitly guided.

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/lisabrennan1996/liteparse-mcp'

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