Skip to main content
Glama

Read text from an image

read_image_text
Read-onlyIdempotent

Extract text from an image with Tesseract. language defaults to eng. Other codes in the list are fetched when first used. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns the text and a confidence from 0 to 100. An image with no text returns an empty string.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>"
    },
    "name": "read_image_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe image. Provide url or data.
languageNoA Tesseract language code such as eng, spa, fra, deu, or jpn.eng

Output Schema

NameRequiredDescriptionDefault
textYes
languageYes
confidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover read-only, open-world, and idempotent characteristics; the description adds real behavioral context: language packs are downloaded lazily on first use, private/local addresses are refused, decoded input is capped at 10 MB, and confidence is reported on a 0-100 scale. It also discloses the empty-string edge case for text-free images, which is exactly the kind of detail annotations cannot carry.

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?

Five short sentences, front-loaded with the verb and engine, then constraints, then output shape. No sentence restates the tool name or wastes words.

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 and annotations cover safety, so the description need only cover inputs and edge cases, which it largely does. It is slightly silent on what happens when both 'url' and 'data' are supplied, and on expected accuracy or failure modes beyond the 10 MB and private-address checks.

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%, so the baseline is 3, but the description adds meaning beyond the schema: the language default of 'eng' plus the non-obvious fact that other codes are fetched on first use (a latency/cost implication). It also clarifies that either base64 data or a public URL is acceptable, reinforcing the mutually exclusive input modes.

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 ('Extract text from an image') and names the engine (Tesseract), which distinguishes it from siblings like read_barcode, read_exif, and count_text. An agent can identify this as the OCR tool 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 Guidelines3/5

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

Usage is implied by the purpose (OCR a given image), but there is no explicit when-to-use/when-not guidance and no routing to alternatives such as count_text or extract_pdf_text for adjacent jobs. The description does not say what to do if the image is a PDF or a scanned document versus a photo.

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.