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 €15/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)}] (up to 60 files, 20 MB total)
formatNotxt or docxtxt
fileNameNoFile name with extension, e.g. report.pdf
languageNoLanguageeng
fileContentNoThe file as base64 (a data: URI is fine; 20 MB total decoded limit per call)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / fileContent / description
      Previous value: -"The file as base64 (a data: URI is fine)"New value: +"The file as base64 (a data: URI is fine; 20 MB total decoded limit per call)"
    • changedInput schema / properties / files / description
      Previous value: -"Or several files: [{fileName, fileContent (base64)}]"New value: +"Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)"
    • addedInput schema / properties / files / maxItems
      Added value: +60
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent safety, yet the description adds genuinely new behavioral facts: server-side processing, files deleted immediately with nothing stored, a per-IP daily rate limit, and the two paid access mechanisms with X-API-Key. It stops short of stating failure behavior for unsupported formats or oversized files, which the schema hints at with the 20 MB limit.

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 what the tool does, then privacy, then access/cost in one flowing sentence chain with no filler. The pricing and x402 URLs are long but carry real information the agent may need to relay.

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 5-param OCR tool with no output schema, the description covers engine, languages, output format, privacy, rate limits, and auth paths. It omits the batch capability (up to 60 files, 20 MB total) and the required-parameter situation (none are required), which an agent would only learn from 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 description coverage is 100%, so the schema already documents fileName, fileContent, format, language, and the files array. The description adds only the language list (English, German, Bulgarian) and the txt/docx return choice; it never mentions the multi-file `files` parameter, so the baseline of 3 holds.

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 ("Read the text from a photo or scan"), names the OCR engine and supported languages, and says what it returns (text or Word file). It implicitly separates itself from PDF siblings by scoping input to photos/scans, but never names pdf_ocr or pdf_to_text to make the boundary explicit.

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

Usage Guidelines3/5

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

Gives practical context about limits and access (free 5 calls/day per IP, paid key or x402 per-call) but never states when to choose this over pdf_ocr or image_to_excel_table. Usage is implied by the input type rather than by explicit routing guidance.

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