Skip to main content
Glama

docs

Ocr Image

ocr_image
Idempotent

OCR one image to text with dual-engine consensus, calibrated confidence and per-segment corroboration. Japanese-strong. Flat $0.05/image. Choose this when the input is an IMAGE (photo, screenshot, receipt); for PDFs use parse_document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoOne of: japanese, latin. Expected script for OCR: japanese or latinjapanese
image_urlNoAbsolute http(s) URL of the image (JPEG/PNG/WebP)
x_paymentNoOptional: base64 X-PAYMENT header value (x402 exact scheme, USDC on Base mainnet). Omit it to receive the payment requirements (accepts[] + docs) for this call without being charged.
image_base64NoBase64-encoded image bytes (alternative to image_url)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesJSON body of the underlying call (see /samples/{product} for each product's shape)
statusYesHTTP status of the underlying call (200 result, 402 payment terms, 4xx input error)
how_to_payNo
receipt_idNoset on paid results; free re-fetch via get_receipt
payment_requiredNotrue when status is 402: body holds x402 payment terms, not a result. Pay and call again with x_payment

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, idempotentHint=true, openWorldHint=true, destructiveHint=false. The description adds real operational context beyond that: dual-engine consensus, calibrated confidence, per-segment corroboration, and a flat $0.05/image cost, which matters because this call is billed. It does not mention the x402 payment handshake, though the schema covers it.

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?

Three short sentences, zero filler, front-loaded with the capability and cost, then the routing rule. Every clause earns its place.

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?

An output schema exists, so return-value explanation is unnecessary, and the schema documents the one-of input and payment header. The routing rule and cost complete the picture; only the payment-requirement flow is left entirely to the schema.

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 lang, image_url, image_base64 and x_payment are already documented in the schema. 'Japanese-strong' hints at the lang default but adds no syntax or format detail beyond the schema. Baseline 3 is appropriate.

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?

Specific verb (OCR) plus resource (one image) plus the differentiating capabilities (dual-engine consensus, calibrated confidence, per-segment corroboration) and the language specialty. It explicitly names the sibling it is not: parse_document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the selection condition directly: 'Choose this when the input is an IMAGE (photo, screenshot, receipt); for PDFs use parse_document.' Both the when and the when-not are given, with the alternative named.

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