Skip to main content
Glama

Read text from images and scanned PDFs (OCR)

ocr_read_text
Read-onlyIdempotent

Read the text from a photo, screenshot, scan or scanned PDF (OCR). If the PDF already has real text, that is returned instead (faster and exact). Use when text is only available as an image: receipts, letters, forms, signs. Send {url} or {base64}, optional lang (default eng, e.g. eng+fra). Max 20 MB, 20 pages. Returns {text, method, pages}. Errors: 400 bad input, 413 too large. Price: $0.01 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic URL of the file. Provide url OR base64.
langNoTesseract language code(s), e.g. eng or eng+fra
base64NoFile contents, base64-encoded (max 20 MB). Provide url OR base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds substantial behavioral detail on top: the text-layer fallback and its exactness benefit, a 20 MB / 20 page ceiling, error codes 400 and 413, the x402 payment requirement at $0.01 USDC per call, and the return shape. This is unusually rich disclosure for an annotated tool.

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?

Front-loads purpose, then fallback behavior, usage contexts, input form, hard limits, return shape, errors, and price in a tight sequence. Every clause carries information an agent needs; there is no filler.

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

Completeness5/5

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

With no output schema, the description compensates by naming the return object {text, method, pages}. Limits, error codes, cost, language handling, and the text-layer fallback are all covered, so an agent has everything needed to invoke and interpret the call.

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 adds the lang default ('default eng, e.g. eng+fra') which the schema does not state, and restates the url-or-base64 requirement alongside the size limit. The addition of a default value is genuine value 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?

States a specific verb and resource ('Read the text from a photo, screenshot, scan or scanned PDF') and immediately scopes it with '(OCR)', which separates it from siblings like pdf_tables_to_json, convert_file, and transcribe_audio. An agent can identify the tool without opening the schema.

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?

'Use when text is only available as an image: receipts, letters, forms, signs' gives clear positive conditions, and the fallback note ('If the PDF already has real text, that is returned instead') implicitly signals when the tool is unnecessary. It does not name an alternative sibling for the text-layer case, so it stops short of explicit routing.

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