Skip to main content
Glama

ocr

ocr
Read-only

Read the text in a scanned image or PDF with Tesseract (English, French, Spanish, German). PDFs with a text layer are read directly; scanned pages are OCR'd at 300 dpi. $0.008 for one page or image, +$0.002 per extra page (max_pages up to 30; default 5 for .pdf URLs). Costs $0.066 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNohttps URL of the file (max 20 MB)
langNoeng (default), fra, spa, deu; combine with +
filenameNoName with extension, helps detect the type
force_ocrNoOCR even when the PDF has a text layer
max_pagesNoPDF pages to read, 1-30
file_base64NoOr the file as base64 / data URI

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

With readOnlyHint/openWorldHint already declaring the safety profile, the description adds substantial operational context the annotations cannot: Tesseract as the engine, 300 dpi rendering, automatic text-layer passthrough, supported languages, and precise per-page plus per-call USDC/x402 cost. An agent knows both what it gets and what it will be charged before invoking.

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 dense sentences, purpose front-loaded, no filler. The closing pricing clause stacks two different cost units (per-page fiat and per-call USDC) that take a moment to reconcile, a minor structural wrinkle in an otherwise tight definition.

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 read-only OCR tool with no output schema, the description covers input handling, language support, page limits, and cost. It does not describe the shape of the returned text (plain text vs structured, per-page splitting), which is the one thing an agent must infer before consuming the result.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description goes further by tying max_pages to cost and to the .pdf-specific default of 5, and by enumerating the language set behind lang. These are semantics beyond the field descriptions, though the $0.008/page vs $0.066 USDC/call figures sit close to redundancy.

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?

States a specific verb and resource ("Read the text in a scanned image or PDF with Tesseract") and scopes it to OCR of image/PDF inputs, which separates it from generic readers like pdf, extract or vision_ask. It stops short of naming any sibling it should be preferred over, so differentiation is inferable rather than explicit.

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 use context (scanned documents vs PDFs with a text layer, plus the force_ocr override) but never states when to pick this tool over alternatives such as vision_ask, document, or pdf_tools, nor when not to. Guidance is implicit rather than an explicit when/when-not rule.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources