Skip to main content
Glama

ocr_pdf

Turn PDFs into Markdown by OCR-ing scanned pages with a local vision model; optionally convert selected page ranges or save output to a file.

Instructions

Convert a PDF to Markdown, OCR-ing scanned/image pages via oMLX.

Text-layer pages go through MarkItDown directly; scanned pages are rendered and OCR'd by the vision model. If pages is given (e.g. "1-5,9"), only those pages are converted. If out_path is given the Markdown is written there and a summary is returned instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
pagesNo
out_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It transparently explains that text pages use MarkItDown, scanned pages use vision OCR, page selection via `pages`, and that `out_path` causes a file write with a summary returned. It does not explicitly mention whether the input PDF is modified, but the described behavior strongly implies a read-and-convert operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is concise and well-structured. It front-loads the main purpose, then provides necessary details about page handling and output behavior in a logical sequence, with no redundant or off-topic information.

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?

The description is sufficiently complete for the tool's functionality: it explains the conversion process, page selection, and output behavior. Since an output schema exists, return-value details are not required. It does not cover error handling or invalid page syntax, but those are not essential for basic contextual completeness.

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?

The schema has 0% description coverage, but the tool description compensates by explaining `pages` with an example format ('1-5,9') and its effect, and `out_path` with its write-and-summary behavior. The `path` parameter is implied as the PDF source. Some details, such as accepted path types or behavior when `out_path` is omitted, are not explicitly stated.

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 clearly states the tool's primary action: converting a PDF to Markdown. It also specifies the resource (PDF) and the output format, and clarifies how scanned vs. text-layer pages are handled, leaving no ambiguity about the tool's purpose.

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 description explains conditional behavior for `pages` and `out_path`, but it does not explicitly state when to choose this tool over its siblings like `inspect_pdf` or `omlx_models`. It lacks direct guidance on use cases or selection criteria relative to alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phatpham9/markitdown-ocr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server