Skip to main content
Glama

Batch OCR: up to 10 files in one call

ocr_batch
Read-onlyIdempotent

Read the text from up to 10 images, scans or PDFs in one paid call, cheaper than one call per file. Use for a stack of receipts, pages of a scanned letter, photos of forms or a folder of screenshots. Send {files:[{url} or {base64}], lang}. Max 30 pages across the batch, 20 MB per file. Each file gets its own result or error. Returns {files, pages, results:[{index, text, method, pages}]}. Errors: 400 bad input, 422 nothing readable. Price: $0.08 USDC per call (x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "files": "<files>"
    },
    "name": "ocr_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoOCR language code(s), e.g. eng
filesYes1-10 files, each {url} or {base64}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent and open-world traits, and the description adds substantial context beyond them: a per-call price with the x402 payment mechanism, batch-wide limits (30 pages total, 20 MB per file), per-file error isolation, and specific HTTP error codes.

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?

It is a single dense paragraph that front-loads purpose, then usage, then limits, then return shape, then errors and price — every element is useful to an agent. Minor redundancy exists where the "Send {files:[{url} or {base64}], lang}" clause largely replays the schema.

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 supplies the return structure ({files, pages, results:[{index, text, method, pages}]}) and the failure modes (400 bad input, 422 nothing readable), plus cost and per-file isolation. An agent can decide, call, and interpret results from the description alone.

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; the description earns an extra point by adding constraints the schema does not express, such as the 30-page limit across the whole batch and the accepted input shapes ({url} or {base64}). Language-code semantics are still left to the schema's single example.

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 opens with a specific verb and resource ("Read the text from up to 10 images, scans or PDFs") and states the batching scope, which implicitly separates it from the single-document sibling ocr_read_text by contrasting "one paid call" against "one call per file".

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?

Concrete usage scenarios are listed (stack of receipts, scanned letter pages, form photos, folder of screenshots), giving an agent a clear picture of the intended workload. It stops short of an explicit "when not to use" rule or naming ocr_read_text for single files, so it sits at a strong 4 rather than a 5.

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