Skip to main content
Glama

OCR: scanned PDF or image (Korean and English) to Markdown

convert_ocr
Read-onlyIdempotent

Use when an agent must read text from a scan, photo or screenshot: scanned PDFs (embedded page images) or PNG/JPEG/WebP up to 5 MB, Korean and English, tables kept as Markdown. Up to 3 pages per call. Input: url via GET, or POST a file (multipart 'file', raw body, or JSON contentBase64). Output: JSON markdown, pages with confidence, warnings. PDFs with selectable text: use /v1/convert/markdown. Use instead: ai_vision for describing an image; convert_to_markdown for digital PDFs or DOCX. Example: ?url= Price: $0.015 per call, paid in USDC (Base, Monad, Polygon, Arbitrum or Solana) via x402.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "convert_ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL of a PNG/JPEG/WebP image or a scanned PDF (≤ 5 MB). For uploads use POST.
contentBase64NoFile bytes as base64 (MCP argument or POST JSON; alternative to url; max 5 MB decoded)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior. The description adds important operational context beyond them: 5 MB size limit, 3 pages per call, supported languages, output shape with confidence and warnings, and pricing/payment mechanism.

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?

The description is dense but well front-loaded, starting with the usage condition and then covering formats, limits, alternatives, and pricing. The example URL is a little cryptic and the text is packed into a short block, but almost every sentence carries relevant information.

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

Completeness5/5

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

With no output schema, the description compensates by describing the JSON return structure (markdown, per-page confidence, warnings). It also covers size/page limits, input methods, language support, alternatives, and cost, which is complete for this conversion tool.

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 both parameters are already documented. The description still adds useful invocation semantics beyond the schema by explaining that URL is used via GET while file uploads use POST multipart 'file', raw body, or JSON contentBase64.

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 (convert/OCR) and resource (scanned PDF or image) and names the output format (Markdown). It explicitly distinguishes itself from digital-PDF and image-description siblings, so an agent can identify its role without opening other schemas.

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

Usage Guidelines5/5

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

Explicitly gives the positive condition (scans, photos, screenshots, scanned PDFs, Korean/English) and the negative cases (digital PDFs should use convert_to_markdown; image description should use ai_vision). It also names the alternative tool for the overlapping case, leaving little inference to the agent.

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