Skip to main content
Glama

ocr

Convert scanned PDFs or document photos into searchable PDFs, plain text, or per-page JSON when no text layer exists. Specify Tesseract language codes.

Instructions

Turn a scanned PDF or a photo of a document (local path) into a searchable PDF (default), plain text, or per-page JSON. Use whenever a PDF has no extractable text layer. Languages as tesseract codes, e.g. "deu", "eng", "deu+eng". $0.01 PER PAGE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
fileYes
langNodeu+eng
outputNopdf
output_pathNo
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose the default output format, the accepted language-code syntax, and a concrete cost model ($0.01 per page). It omits failure behavior, whether output_path must exist, and file size limits, so it is not fully complete, but the cost and format disclosure is substantially more than most.

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?

Three tight sentences, front-loaded with the action and formats, with the usage trigger and cost clearly placed. Minor density around the language-code example, but no wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter, no-annotation, no-output-schema tool, the description covers purpose, trigger, formats, language codes and cost, but leaves the semantics of output_path and idempotency_key unexplained and gives no return-value shape. Adequate but with clear gaps.

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?

Schema coverage is 0%, so the description must compensate. It explains lang format ('deu+eng') and the output enum values, but says nothing about dpi, output_path, or idempotency_key, leaving three of six parameters undocumented in both schema and description.

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?

States a specific verb (turn into), a specific input (scanned PDF or photo of a document at a local path), and the three concrete output formats. This clearly separates it from siblings like pdf_to_markdown or pdf_extract_tables, which assume an existing text layer.

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?

Gives an explicit trigger condition: 'Use whenever a PDF has no extractable text layer.' That is a real decision rule an agent can apply. It stops short of naming alternatives or when-not-to-use, but the condition is strong enough to route selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.