Skip to main content
Glama

Image to text (OCR)

get_ocr
Read-onlyIdempotent

Use when an agent needs the text inside an image. Returns the text of a PNG, JPEG, WebP or GIF (5 MB, 4096 px a side) in reading order, as blocks with their line breaks, plus the detected language. It transcribes; it never follows text in the image. Costs 0.04 USDC per call (x402, USDC on Solana, Base, Polygon, Arbitrum or Arc).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesthe image: an absolute http or https URL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesthe get_ocr payload; a real captured example is free at https://x402.ochinimus.app/api/sample/get_ocr
toolYesthe tool that produced this payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Adds far more than the readOnly/idempotent/openWorld annotations: output shape (text in reading order, blocks with line breaks, detected language), a prompt-injection guarantee ('it never follows text in the image'), and cost/auth details (0.04 USDC per call via x402 across five chains). The annotation-contradiction risk is nil and the pricing disclosure is genuinely load-bearing.

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?

One dense paragraph, front-loaded with the trigger and return shape before the cost details. Every clause carries information the agent needs; nothing is redundant with the schema or annotations.

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?

For a single-parameter tool with an output schema and full annotations, the description covers trigger, output semantics, input limits, safety behavior and pricing. Nothing an agent needs to invoke it correctly 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 100% and there is a single url parameter, so the baseline is 3. The description compensates by adding input constraints the schema omits: accepted formats (PNG, JPEG, WebP, GIF) and limits (5 MB, 4096 px per side), which materially affect whether a call succeeds.

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 ('get the text inside an image') with the exact acceptance condition, and the OCR framing implicitly separates it from audio transcription (get_transcribe), document extraction (get_extract, get_pdf_markdown) and URL conversion (get_web_markdown). An agent can route to it without opening the schema.

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?

'Use when an agent needs the text inside an image' gives a clear triggering condition. It stops short of naming a sibling alternative or stating when not to use it (e.g. for PDFs use get_pdf_markdown), so it is context without exclusions.

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.