Skip to main content
Glama

PDF OCR API - make a scanned PDF searchable

pdf_ocr
Read-onlyIdempotent

Add an invisible text layer to a scanned PDF so it can be searched and copied (Tesseract, English, German, Bulgarian). First 5 pages per call. 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/pdf-ocr.

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": "sample.pdf",
      "fileContent": "JVBERi0xLjMKJeLjz9MKMSAwIG9iago8PAovUHJvZHVjZXIgKHB5cGRmKQo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDEKL0tpZHMgWyA0IDAgUiBdCj4+CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAyIDAgUgo+PgplbmRvYmoKNCAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Cj4+Ci9NZWRpYUJveCBbIDAuMCAwLjAgNTk1IDg0MiBdCi9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwMDU0IDAwMDAwIG4gCjAwMDAwMDAxMTMgMDAwMDAgbiAKMDAwMDAwMDE2MiAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDUKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjI1NgolJUVPRgo="
    },
    "name": "pdf_ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoOr several files: [{fileName, fileContent (base64)}]
fileNameNoFile name with extension, e.g. report.pdf
languageNoLanguage of the texteng
fileContentNoThe file as base64 (a data: URI is fine)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld; the description adds substantial behavior: a hard 5-page-per-call cap, server-side processing, immediate file deletion with no storage, a 25 calls/day per IP free tier, and a paid x402 path with a stated price and endpoint. These are exactly the constraints an agent needs before calling a file-upload tool, and nothing conflicts with the readOnly/idempotent hints.

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 front-loaded sentences: capability first, then limits and pricing. Dense but nearly every clause earns its place; the x402 URL is the one item that could arguably be trimmed, though it is actionable.

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?

With no output schema, the description should ideally say what comes back (a PDF with the text layer, base64? a URL?), and it does not. Everything else an agent needs to call it correctly — language values, page cap, privacy, rate limits, cost — is present, so this is a single notable gap rather than a broad one.

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 coverage is 100%, so the baseline is 3. The description adds only marginal meaning beyond the schema: it restates the supported languages already enumerated in the 'language' enum, and its 'first 5 pages per call' note constrains behavior more than any parameter. It does not clarify how 'files' (multi-file array) differs from the single fileName/fileContent pair.

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 states a precise verb and resource ('Add an invisible text layer to a scanned PDF') plus the resulting benefit ('so it can be searched and copied'), and names the OCR engine and supported languages. This lets an agent distinguish it from a pure text-extraction sibling such as pdf_to_text without opening any 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 rather than stated: 'scanned PDF' signals the input type, and 'so it can be searched and copied' implies the goal. But there is no explicit 'use this instead of pdf_to_text when...' routing, and no instruction on what to do for PDFs over 5 pages beyond the bare limit.

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