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: 25 calls/day per IP. Paid: $0.01 per 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/jtYhbBQDI/DHuHNaJcm4CVs7/X/HdJS33BalAEN7G1yv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5+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. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds genuinely non-structured behavior: server-side execution, immediate file deletion with nothing stored, a 25 calls/day free tier, and a $0.01 x402 paid path. It stops short of describing what happens on OCR failure or with unsupported languages, which keeps it below a 5.

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?

Four compact sentences, front-loaded with capability before cost and privacy details, and each sentence carries distinct information (function, output, data handling, pricing). Nothing is repeated from the schema or annotations.

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?

There is no output schema, so stating the return values (text or a Word file) is necessary and present, as are privacy and cost constraints that affect invocation decisions. The one gap is the batch `files` parameter, which the description never mentions, leaving the multi-file path undocumented in prose.

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 baseline is 3. The description adds only light semantics beyond the schema by naming the supported languages and the txt/docx output choice, both of which are already captured by the language and format enums and defaults.

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?

The description opens with a specific verb-plus-resource ("Read the text from a photo or scan") and narrows the domain further by naming the OCR engine and the three supported languages. That scoping implicitly separates it from the PDF-oriented siblings such as pdf_ocr and pdf_to_text, so an agent can route image input here without inspecting 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 Guidelines3/5

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

The input type (photo or scan) and the language choices give implied usage context, but the description never states when to prefer this over pdf_ocr or pdf_to_text, nor any exclusions such as file size or image format limits. The rate-limit and pricing sentences describe cost, not selection 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