Skip to main content
Glama

OCR-AI

Read a document

read_document

Read a PDF or an image (JPEG, PNG, WebP) and return its text, its key fields (vendor, dates, totals, VAT, ids…) and its tables, page by page. Built for Hebrew and English documents, including mixed right-to-left lines. Costs one page from the key's account per page read; a page that fails is not charged. Up to 20 pages per call: read longer PDFs in ranges with "pages". A call of many pages can take more than a minute. Pages your client stops waiting for may still be charged, so if a call times out, read smaller ranges, for example 5 pages per call.

Input Schema

NameRequiredDescriptionDefault
hintNoWhat the document is, if known. Default: auto.
pagesNoPDF pages to read, for example "1-5,8". Default: from page 1, up to the per-call limit.
file_urlNoA public https URL of the document. Use this or file_base64.
languageNoLanguage of the field labels and summary in the result. Default: en.
file_base64NoThe document's bytes, base64-encoded. Use this or file_url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing metering (one page from the key's account per page read), that failed pages are not charged, that pages the client abandons may still be charged, a >1-minute latency warning, and the 20-page per-call ceiling. This also explains why readOnlyHint is false for a read-shaped tool: the call consumes credit. No contradiction with the supplied hints.

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?

Front-loaded with capability and return shape, then cost, then limit, then timeout workaround — a sensible order. The final sentence is somewhat redundant with the earlier range advice but carries the non-obvious billing consequence, so the length is largely earned.

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 carries the return contract itself and does so (text, key fields, tables, per page). Combined with the credit model, page ceiling, latency and timeout guidance, an agent has everything needed to call it correctly and to recover from failure.

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 real meaning for "pages" by tying it to the 20-page per-call cap and recommending 5-page ranges on timeouts, and it frames "language" as controlling field-label and summary language in the result. The "hint" and file-source parameters are left entirely to 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 a document) plus the accepted formats (PDF, JPEG, PNG, WebP) and exactly what comes back: text, key fields such as vendor/dates/totals/VAT/ids, and tables, page by page. Nothing about it overlaps with buy_pages or check_balance, so the agent can route correctly from the description alone.

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 concrete operating guidance: use "pages" to read long PDFs in ranges, cap at 20 pages per call, and shrink ranges to about 5 pages on timeouts. It does not explicitly say when to prefer buy_pages or check_balance (e.g., on an out-of-credit failure), so it is clear context without stated alternatives.

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