Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

ocr_pdf

Extract text from scanned PDFs using OCR. Supports page ranges, multiple languages, and adjustable DPI for balancing accuracy and performance.

Instructions

Perform OCR on PDF pages using Tesseract for scanned documents.

Args:
    file_path: Path to the PDF file
    pages: Page range (e.g., '1,3,5-10,-1' for pages 1, 3, 5 to 10, and last page)
    language: OCR language code (default: 'chi_sim' for simplified Chinese)
    chunk_size: Maximum size of text chunks
    chunk_overlap: Overlap between chunks to preserve context
    dpi: DPI for PDF to image conversion (higher = better quality, slower)
    
Returns:
    JSON string with OCR results and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
pagesNo
languageNochi_sim
chunk_sizeNo
chunk_overlapNo
dpiNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are present, so the description carries full burden. It mentions Tesseract, default language, and DPI trade-off, but lacks details on error handling, output format specifics, or performance beyond DPI.

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

Conciseness3/5

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

The description is front-loaded with the main purpose but contains an Args section that lists parameters. It is readable but could be more concise; some parameter descriptions are redundant with the schema.

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?

Given 6 parameters, no annotations, and an existing output schema, the description covers all parameters but lacks usage context, failure scenarios, and comprehensive behavioral info. It is adequate but has gaps.

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 description coverage is 0%, but the description adds explanations for all six parameters, including page range format, default language, and DPI effect. Chunk_size and chunk_overlap definitions are somewhat vague but still add value.

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 performs OCR on PDF pages using Tesseract for scanned documents. It distinguishes from siblings like read_pdf (likely for digital text extraction) and pdf_to_images (conversion only).

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 implies it is for scanned documents but does not explicitly contrast with alternatives like read_pdf or extract_page_text. No direct 'when to use' or 'when not to use' guidance is provided.

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/lihongwen/pdfreadermcp'

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