Skip to main content
Glama
Document Reader MCP Server

Document Reader MCP Server

by abdo544445

ocr_pdf

Extract text from scanned or image-based PDFs with OCR when standard page reading returns empty or garbled text.

Instructions

OCR (Optical Character Recognition) for scanned or image-based PDF files. Use this ONLY when read_document_page returns empty or garbled text, which indicates the PDF contains scanned images instead of selectable text. WARNING: OCR is slow (3-10 seconds per page). Prefer read_document_page first.

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": {
      "filePath": "<filePath>"
    },
    "name": "ocr_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesAbsolute path to the PDF file
pageNumberNoPage number to OCR (1-indexed). If omitted, OCR all pages (max 20).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose an important non-obvious trait: a 3-10 second per page cost, which materially affects agent planning and timeout choices. It does not cover return format, whether results are cached, or behavior on password-protected/corrupt files, so it stops short of full behavioral disclosure.

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?

Three short sentences, front-loaded with the resource, then the gating condition, then the performance warning. Every clause earns its place and the actionable warning is not buried.

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 fallback tool with complete schema coverage and no output schema, the description supplies everything needed to decide to call it and how expensive that call is. The only gap is what the returned text looks like, which is a minor omission for a tool whose output is plainly extracted text.

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 both parameters are already documented in the schema, including the 1-indexed pageNumber and the default of all pages capped at 20. The description adds no parameter-level meaning beyond that, which matches the baseline 3.

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 (OCR) and resource (scanned or image-based PDFs), and explicitly contrasts with read_document_page, whose empty/garbled output is the signal that this tool is needed. An agent can distinguish it from read_full_document or search_document 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 Guidelines5/5

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

Gives an explicit precondition (ONLY when read_document_page returns empty or garbled text), names the preferred alternative first, and explains the underlying cause (scanned images rather than selectable text). This is a complete when/when-not/alternative routing rule.

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