Skip to main content
Glama

DevX Agent Hub

OCR: image to text

image_to_text_ocr
Read-onlyIdempotent

OCR / image to text / text extraction from screenshots, receipts, invoices, scanned documents, signs and photos (PNG, JPEG, WebP, GIF up to 3 MB). Returns text in reading order, or Markdown with tables and lists. $0.002 USDC per image on Base via x402; images without text are not charged. Price: $0.002 per image. First call returns the x402 PaymentRequired (no charge); retry with payment in _meta["x402/payment"].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo
image_urlNoPublic http(s) URL of the image (max 3 MB). Preferred.
requestKeyNoOptional idempotency key: same payer + requestKey + input returns the stored result without a second charge (7 days).
image_base64NoBase64 image (max ~1 MB via MCP)
x402_paymentNoOptional. Base64 x402 v2 PaymentPayload, for clients that cannot set params._meta["x402/payment"]. Omit on the first call to get the exact price.
language_hintNo

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 readOnly/idempotent annotations: it discloses the exact price ($0.002 USDC on Base), the billing exception (images without text are free), the 3 MB limit, and the non-obvious first-call-uncharged payment handshake with the precise retry mechanism. This is the kind of behavior an agent could not infer from annotations or schema alone.

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-loads the purpose, then formats, then price/payment, which is a sensible order. It repeats the price twice ('$0.002 USDC per image on Base via x402' and 'Price: $0.002 per image'), which is a small redundancy in an otherwise dense, useful block.

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?

Covers what the tool accepts, limits, output shape (reading-order text vs Markdown tables/lists), and the full payment lifecycle, which is the riskiest part of calling it. With no output schema, describing the return value fills that gap; nothing essential for a correct call is missing.

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 67%, and the description adds real meaning: it explains that the format option yields either plain text in reading order or Markdown with tables/lists, and it documents the x402 payment parameter and retry path. It does not mention requestKey idempotency, which is left to the schema, so it is not fully complete.

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 ('OCR / image to text / text extraction') plus the exact input classes it handles (screenshots, receipts, invoices, scanned documents, signs, photos) and accepted formats. An agent can immediately tell this is the image-to-text tool and not the speech or web-page siblings.

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?

The description gives clear conditions for use (image content types, supported formats, 3 MB cap) and spells out the two-step x402 payment flow (first call returns PaymentRequired, retry with payment in _meta). It stops short of naming alternatives or exclusions, e.g. when to prefer image_to_text_ocr_demo or web_page_to_markdown for URL content.

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