Skip to main content
Glama

APEX AI, LLM, Embeddings, OCR & Media

Image ocr

image_ocr
Read-onlyIdempotent

Extract text from scanned documents, receipts, screenshots, or scanned PDFs (max 10 MB, up to 3 PDF pages) via sharp, Ghostscript (-dSAFER) and Tesseract OCR. $0.004 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for the terms, sign them with your own wallet, call again with payment.

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": {
      "url": "<url>"
    },
    "name": "image_ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYespublic http(s) URL of a PNG/JPEG/WebP/TIFF/GIF image or PDF
langNoinstalled Tesseract language: eng (default) or osd
paymentNoa signed x402 payment (the base64 payload you would put in PAYMENT-SIGNATURE). Pass it and the purchase completes inside this tool call.
maxPagesNomax scanned PDF pages to OCR: 1-3 (default 2)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, non-destructive, idempotent, open-world), and the description adds what they cannot: hard input limits (10 MB, up to 3 PDF pages), the processing stack, a concrete price ($0.004 per call), accepted payment rails, and the two-call handshake where the first call returns terms rather than text. That is exactly the behavioral context an agent needs before paying.

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?

Two sentences, purpose front-loaded, then constraints and payment flow. The engine list (sharp, Ghostscript -dSAFER, Tesseract) is mildly incidental but arguably relevant to supported formats, so there is little waste.

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 paid, network-bound OCR tool with no output schema, the description covers inputs, size limits, pricing, and the payment handshake. It does not state what the return looks like (raw text vs pages), a minor gap given the tool's simplicity.

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 100%, so url, lang, payment, and maxPages are already documented. The description only indirectly reinforces payment (sign-and-resend) and page limits; it adds little syntax or format meaning beyond the schema, so the baseline 3 applies.

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: extract text from scanned documents, receipts, screenshots, or scanned PDFs, and names the engines used. An agent can distinguish it from image_analyze or image_generate by the OCR/text-extraction framing, though no sibling is named explicitly.

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 explicit procedural guidance for the unusual part of using it: call once without `payment` to get terms, sign with your own wallet, then call again with `payment` to complete. It does not say when to prefer this over image_analyze for an image, so the alternative-selection guidance is absent.

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.