Skip to main content
Glama

photo_to_text

Photo to Text (OCR) — Extract text from an image via OCR. Language selection uses comma-separated ISO-639-1 codes (en, fr, de, ...) — not Tesseract codes. [category: photo]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesJPG, PNG, WebP, BMP, TIFF (max 15MB)
outputNojson returns structured results; text returns plain text.json
binarizeNoForce the picture to pure black and white before reading it. Off by default because it destroys text in uneven light; try it on faint or washed-out scans.
languagesNoWhich language or languages the writing is in, as two-letter codes. One, or several separated by commas: en, or en,fr. Common ones are en, fr, de, es, pt, it, nl, ru, ar, zh, ja, ko. Field name is languages, not language, and Tesseract-style codes like eng are not recognised.en
preprocessNoApply image preprocessing before OCR.
binarize_thresholdNoThe cut-off between black and white, as a percent. Lower keeps more of the picture black. Only used when black and white is forced on; anything outside 1-99 quietly reverts to 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / binarize
      Added value: +{
      +  "default": false,
      +  "description": "Force the picture to pure black and white before reading it. Off by default because it destroys text in uneven light; try it on faint or washed-out scans.",
      +  "title": "Force black and white",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / binarize_threshold
      Added value: +{
      +  "default": 60,
      +  "description": "The cut-off between black and white, as a percent. Lower keeps more of the picture black. Only used when black and white is forced on; anything outside 1-99 quietly reverts to 60.",
      +  "maximum": 99,
      +  "minimum": 1,
      +  "type": "integer",
      +  "x-show-when": {
      +    "binarize": [
      +      "true"
      +    ]
      +  }
      +}
    • changedInput schema / properties / languages / description
      Previous value: -"Comma-separated ISO-639-1 codes, e.g. 'en' or 'en,fr'. Supported: en, fr, de, es, pt, it, zh, ja, ar, ru, ko, nl. Field name is 'languages' — not 'language'; Tesseract codes like 'eng' are NOT recognized."New value: +"Which language or languages the writing is in, as two-letter codes. One, or several separated by commas: en, or en,fr. Common ones are en, fr, de, es, pt, it, nl, ru, ar, zh, ja, ko. Field name is languages, not language, and Tesseract-style codes like eng are not recognised."
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations supply the safety profile (destructiveHint=false, openWorldHint=false), so the lower bar applies. The description adds the important ISO-639-1 vs Tesseract code constraint, but says nothing about cost, processing time, or how results are surfaced. Note readOnlyHint=false is unusual for an OCR read, though the description does not contradict it.

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?

Two tight sentences with the core purpose front-loaded, followed by the one non-obvious gotcha (code format). The '[category: photo]' tag is minor metadata rather than waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and six parameters, one of which (output) determines return shape. The description never explains what is returned (plain text vs structured OCR blocks), so it is adequate but leaves a gap an agent would want filled before invoking.

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% (every parameter, including binarize, binarize_threshold, and languages, is documented in-schema). The description's language-code note largely restates what the 'languages' property already says, so it does not add meaning beyond the schema. Baseline 3 is appropriate.

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: 'Extract text from an image via OCR.' The word 'image' implicitly separates it from the pdf_ocr sibling, so an agent can route correctly, but no alternative is named explicitly.

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 resource boundary (images, not PDFs), and the language-code warning is a useful usage hint. However, there is no explicit when-to-use/when-not guidance, no mention of when pdf_ocr is the better pick, and no prerequisites.

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