Skip to main content
Glama

parse_pdf

Extract structured text and bounding boxes from PDFs, with OCR support for scanned pages.

Instructions

Parse a PDF and return structured text plus bounding boxes for every text item on every page.

Bounding-box coordinates are in PDF points (1 pt = 1/72 inch), with the origin at the top-left corner of each page.

Returns JSON: { "pages": [ { "page_num", "width_pts", "height_pts", "text", "text_items": [ { "text", "x", "y", "width", "height", "font_name", "font_size", "confidence" } ] } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNoResolution used internally (affects OCR quality). Default 150.
pagesNoComma-separated page numbers, e.g. '1,3,5'. Omit for all pages.
pdf_pathYesAbsolute path to the PDF file to parse.
ocr_enabledNoRun OCR on image-based / scanned pages.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so effectively by specifying the coordinate system (PDF points, top-left origin), the exact JSON return structure, and the optional OCR behavior for scanned pages. It does not, however, disclose any potential side effects, error conditions, or performance implications, which keeps it from a 5.

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 description is well-structured: a clear one-sentence purpose, a concise coordinate-system note, and a detailed JSON example. The JSON block adds clarity but is slightly redundant given the output schema, yet it is readable and every section earns its place, so it merits a 4 rather than a 5.

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 has four parameters and a rich output schema, and the description provides substantial context: what it does, the unit and origin for coordinates, the JSON structure, and OCR usage. It lacks guidance on edge cases or failure modes, but for typical usage it is complete enough for an agent to select and invoke the tool correctly.

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 schema provides 100% coverage of all four parameters (dpi, pages, pdf_path, ocr_enabled) with descriptions, so the schema already conveys their meaning. The tool description adds no additional parameter-specific context, such as how pages interacts with other parameters or detailed OCR trade-offs, so the baseline score of 3 is appropriate.

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 clearly states the tool parses a PDF and returns structured text plus bounding boxes for every text item on every page, which is specific and unambiguous. However, it does not explicitly distinguish this from the sibling tool batch_parse_pdfs, which likely handles multiple PDFs, so it lacks the full differentiation seen in a perfect 5.

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 the tool is used for parsing a single PDF and extracting text and bounding boxes, but it does not explicitly mention when to choose this over batch_parse_pdfs, search_pdf, or screenshot_pdf. There are no exclusions or clear alternative guidance, so it earns a middle score for implied but not explicit usage direction.

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