Skip to main content
Glama

Image to Text API - OCR for photos and scans

image_to_text
Read-onlyIdempotent

Read the text from a photo or scan (Tesseract OCR, English, German, Bulgarian). Returns text or a Word file. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.01/call via x402 at https://radarbg.com/x402/image-to-text.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fileName": "scan.png",
      "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAaQAAABaCAAAAADSyH00AAAJA0lEQVR42u2ce3QU1R3Hv7O75L0kqZQQEhUaGhTk3ZYiLzEnBsRQHpJI0EgIPgqIUEo5Aj09Vs8BRYqUgyIJkRQEivRwTIHEIrQkwUdjMQ8ohBNAengkEMybDXnsr3/MzM7M7s7uTOJp0/r7/sPdO7+58733M/e3997NQSCwerosPAQMicWQGBKLIbEYEkNiMSQWQ2JILIbEkFgMicWQGBKLIbEYEkNiMSQWQ2JILIbEkFgMifVfhHRGENb9P4xMD+qHJ6R6Qej3H7fRfOL1J+LttsiRi0tUtbRvemxQ/8fe7/QZBRQtHhoZOjj5vWp1ZbXgoe3ddNny6bZFYwIF4XWTvjWDq9IEAMgWhKVKwAJB2K8KtPSOm7P7LshddUAUdUMVwFrTN6UqNuc3y5W3p0hVY6/5iKKaWXLlWHWTNzwH+V3tQz8DfmOqH9Oldl4z6VszuCqNJyLKApYoAc8C+9wD423f+qR4qJt/Xf7B9U/E6d32s2Kp6ovHi8P0onDj0fM9IicZ890VXeghCwf7o2sPl91ou3lwBPDXLLFuWzGEZedbL621omyDbpRzznlg3vHa9hsFi/urm+wnvZsfAqlS8cVuugwbtzirZIN53xqp0lSxz6dFEZGzoTAF+PbTXffkmAhMICKitj7ABiIiygZC6nWi6PeAZY+vFlWQqJvpjoiINqvTnUnf3gZXN93JgQt73BI8aBMgpq/jtYhbB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fn/0c3NKdDo9Llg6BW/dPNYeeN+sPHJ0dyZ5+vYzk4hq30iMCQqKmbqp3mteFPj/u+v54j+OZEgshsSQWAyJxZAYEoshsRgSQ2IxJIbEYkgshsSQWAyJxZAYEoshsRgSQ2IxJIbEYkgshsSQWAyJxZAYEoshMSQWQ2IxJIbEYkgshsSQWAyJxZAYEoshfWf0b2/wKq9McT6lAAAAAElFTkSuQmCC"
    },
    "name": "image_to_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoOr several files: [{fileName, fileContent (base64)}]
formatNotxt or docxtxt
fileNameNoFile name with extension, e.g. report.pdf
languageNoLanguageeng
fileContentNoThe file as base64 (a data: URI is fine)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Adds genuinely useful behavior beyond the annotations: server-side execution, immediate file deletion with nothing stored, daily quota, and paid access paths with pricing. Return format and privacy posture are disclosed, though it says nothing about failure modes, file size limits, or base64 payload constraints.

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?

Purpose, languages, and return type are front-loaded in the first two sentences, with operational details after. The pricing URLs are somewhat verbose, but they carry the auth/payment information an agent needs, so the length mostly earns itself.

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?

Covers what it does, what it returns, privacy and storage, cost, and access methods, which is sufficient for a no-output-schema OCR tool. The one gap is that the multi-file 'files' parameter and any per-file limits go unmentioned, leaving an agent to discover them from the schema alone.

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 the schema already documents fileName, fileContent, format, language, and files. The description reinforces the language set and output format but adds no syntax or constraint details (size limits, extension rules, multi-file behavior) beyond what the schema provides, so the baseline 3 holds.

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 ('Read the text from a photo or scan'), names the OCR engine and supported languages, and reports the return medium (text or Word file). The photo/scan scope implicitly separates it from the pdf_to_text sibling without needing to open either 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?

Makes clear this is for photos and scans and lists the supported language set, plus practical access constraints (5 free calls/day per IP, API key or x402 payment). It stops short of explicitly naming the PDF-based alternative, so routing for PDFs is inferred rather than stated.

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