Skip to main content
Glama

ocr

OCR: extract text from an image (JPG/PNG) or a PDF, including scanned PDFs with no text layer. Local engine (Tesseract 5), Spanish and English. Upload the file via multipart (field 'archivo') or send it as 'archivo_b64' in JSON. Optional 'lang' (spa|eng|spa+en [x402: 0.004 USDC on Base, pay-per-use]

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_b64": "<file_b64>"
    },
    "name": "ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNospa|eng|spa+eng
file_b64YesFile as base64 (or upload it via multipart)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / archivo_b64
      Removed value: -{
      -  "description": "Imagen/PDF en base64 (o subir 'archivo' por multipart)",
      -  "type": "string"
      -}
    • addedInput schema / properties / file_b64
      Added value: +{
      +  "description": "File as base64 (or upload it via multipart)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "archivo_b64"
      -]New value: +[
      +  "file_b64"
      +]
  2. First observed

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses the engine (local Tesseract 5), supported languages, both transport options, and a per-call price of 0.004 USDC on Base. It omits file-size limits, error behavior, and what the response looks like, which keeps it from 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense but front-loaded sentence set: capability first, then engine/language, then transport, then price. Nothing is padded, though the bracketed pricing clause and mixed field names make the tail harder to parse than it needs to be.

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 two-parameter tool with no output schema and no annotations, the definition covers the important context: what it accepts, how to send it, which languages, where processing happens, and what it costs. The missing pieces are file-size/format limits and an explicit statement of the returned text format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description actively introduces a conflicting naming: it says to send 'archivo_b64' in JSON and use multipart field 'archivo', while the schema requires 'file_b64'. An agent following the prose could submit a field name that fails validation, which is worse than adding no parameter detail at all.

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?

Names a specific verb and resource ('extract text from an image (JPG/PNG) or a PDF'), and adds scope detail that matters: it handles scanned PDFs with no text layer. It does not explicitly contrast itself with the sibling 'ocr-imagen', so the agent must infer that this one is the broader image+PDF variant.

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 input types listed (images, PDFs, scanned PDFs), which tells the agent this is the general extraction tool. There is no explicit when-not-to-use guidance and no named alternative for, say, text-only or audio inputs, so routing between siblings is left to inference.

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.