Skip to main content
Glama

pdf_ocr

Extract text from scanned PDFs without a text layer. Use Tesseract OCR on selected pages, languages, and DPI settings.

Instructions

OCR scanned PDF pages into text using Tesseract. Slower than pdf_read but works on PDFs without a text layer. Capped at 10 pages per call.

Args: source: Local file path or direct http(s) URL to a PDF. pages: Page selection like '1-5'. Default first page. language: Tesseract language code(s), e.g. 'eng', 'eng+deu'. dpi: Render resolution before OCR (150-300, default 200). max_chars: Character cap for the result (0 = default cap).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
pagesNo1
sourceYes
languageNoeng
max_charsNo

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 full responsibility for behavioral disclosure. It mentions performance (slower than pdf_read) and a hard limit (capped at 10 pages per call), which are useful. It does not disclose output format, but since an output schema exists, that is covered. It also implies OCR quality and language support via parameters.

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 compact and well-structured: a single-sentence overview, a comparative note, a explicit cap, and a bulleted Args list. No redundant or filler sentences; every sentence adds value.

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?

For a tool with 5 parameters and no annotations, the description covers all parameters and key operational limits (page cap, speed). It doesn't mention edge cases like error handling or unsupported formats, but the presence of an output schema mitigates the need to describe return structure. Minor gap: no mention of authentication or file access prerequisites.

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%, so the description must fully explain parameters. It does: each of the five parameters (source, pages, language, dpi, max_chars) is described with type, default, and purpose in the Args section, adding significant meaning beyond the 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 states a specific verb ('OCR'), resource ('scanned PDF pages'), and method ('using Tesseract'), and explicitly contrasts with the sibling tool pdf_read (works on PDFs without a text layer, slower). This clearly distinguishes it from similar tools.

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 provides a clear usage context: it works on PDFs without a text layer and is slower than pdf_read, implicitly guiding when to choose this over pdf_read. However, it doesn't explicitly state 'use this when...' or mention alternatives like image_ocr, so it's not fully explicit.

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/Builderstar/openmedia-mcp'

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