Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

read_pdf

Extract text from PDF files with control over page range and chunking. Specify pages, chunk size, and overlap to process only needed content.

Instructions

Extract text from PDF files with intelligent page handling and chunking.

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)
    chunk_size: Maximum size of text chunks
    chunk_overlap: Overlap between chunks to preserve context
    
Returns:
    JSON string with extracted text and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
pagesNo
chunk_sizeNo
chunk_overlapNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions returns JSON with extracted text and metadata but does not disclose side effects, permissions, file size limits, or error handling, leaving significant behavioral gaps.

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?

The description is front-loaded with purpose and structured as a docstring with Args and Returns. It is reasonably concise, though the Returns section could be trimmed since an output schema exists, but it still adds value.

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 the tool has 4 parameters and no annotations, the description covers parameter semantics and return type but lacks context on prerequisites (e.g., file must exist), error conditions, and safety traits, making it adequate but not fully complete.

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 input schema has 0% coverage (no descriptions in properties), but the description provides explanations for all 4 parameters, including the format for 'pages' (with examples), and context for chunk_size and chunk_overlap, adding significant meaning beyond the schema.

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 verb 'Extract' and resource 'text from PDF files', and mentions intelligent page handling and chunking, which distinguishes it from sibling tools like extract_pages or search_pdf_text that have different purposes.

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 usage for PDF text extraction with specific page and chunking needs, but does not explicitly state when to use this tool versus alternatives, nor does it provide when-not-to-use guidance.

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