Skip to main content
Glama

ocr_pdf

OCR a PDF by rasterizing pages and applying an OCR engine per page. Supports configurable engine, language, page ranges, and DPI for accurate text extraction.

Instructions

OCR a PDF by rasterizing pages (PyMuPDF) then running an engine per page.

Args: path: absolute path to the PDF. engine/lang: see ocr_image. pages: 'all' or a range like '1-3,5'. dpi: rasterization DPI (default 300; higher = slower, more accurate).

Returns JSON: {page_count, pages:[{page, ...ocr_image result...}], full_text}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
engineNoauto
langNoen
pagesNoall
dpiNo

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 explains the rasterization process, parameter defaults (DPI=300) and trade-offs (higher = slower, more accurate), and the structure of the JSON output. However, it omits potential error conditions or file size limits.

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 (5 lines) with a clear Args section and Returns section. Every sentence adds value; no redundancy or fluff.

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?

Given 5 parameters, no annotations, but a defined output, the description covers purpose, process, parameters, and return structure. It references ocr_image for engine/lang details. Minor gaps: no error handling or constraints on path validity, but generally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds full meaning for all five parameters: path (absolute path), engine/lang (refers to ocr_image), pages (range syntax), dpi (with default and performance trade-off). This significantly exceeds the schema's bare parameter names.

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 'OCR', the resource 'PDF', and the process 'rasterizing pages then running an engine per page'. This distinguishes it from siblings like ocr_image (single image) and batch_ocr.

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?

Usage is implied for PDFs, but there is no explicit guidance on when to use this tool versus alternatives like ocr_image or batch_ocr. No when-not-to-use or exclusions are provided.

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/Prekzursil/abbyy-finereader-ocr-mcp'

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