Skip to main content
Glama

pdf_ocr

Extract text from scanned PDFs or images using OCR, converting them into plain text files or searchable PDFs.

Instructions

Performs OCR on a PDF. [Input: Scanned PDF / Image | Output: Plain Text (.txt) / PDF]

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": {
      "input": "<input>",
      "output": "<output>"
    },
    "name": "pdf_ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesThe input PDF file path.
outputYesThe output PDF file path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it only covers input/output formats. It says nothing about OCR runtime, language handling, whether an existing output file is overwritten, or what happens when the input already contains a text layer. Worse, it states output may be '.txt' while the schema describes the output parameter solely as a PDF path, leaving the actual write behavior ambiguous.

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 compact clauses with the core action front-loaded and a bracketed I/O summary that is easy to scan. Nothing is padded, though the bracket notation is terse enough that it sacrifices some clarity for brevity.

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?

With no annotations and no output schema, the description is the only source of behavioral information, and it only covers formats. For a file-mutating, potentially slow OCR operation, the agent still lacks guidance on overwrite semantics, supported input image types, and expected output shape.

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%, so both parameters are already documented and the baseline is 3. The description does add that input can be an image as well as a scanned PDF, but its claim of a '.txt' output option conflicts with the schema's 'The output PDF file path', so the added meaning is partly offset by confusion.

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 ('Performs OCR on a PDF') and adds the accepted input forms and produced output forms. It implicitly distinguishes itself from text-extraction siblings by naming 'Scanned PDF', but never names an alternative tool 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?

The 'Input: Scanned PDF / Image' tag implies the tool is for documents without a text layer, which is a usable usage signal. However, there is no explicit when-to-use/when-not-to-use statement and no routing to pdf_extract_text for PDFs that already have text, which is the most likely confusion point.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.