Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

pdf_to_images

Convert PDF document pages to image files. Select specific pages, adjust resolution, and choose output format.

Instructions

Convert PDF pages to images.

Args:
    file_path: Path to PDF file
    pages: Page range (e.g., '1,3,5-10,-1' for pages 1, 3, 5 to 10, and last page)
    dpi: Resolution for image conversion (default: 200)
    image_format: Output format ('PNG', 'JPEG', etc.)
    output_dir: Directory to save images (default: auto-generated)
    save_to_disk: Whether to save images to disk or keep in memory
    
Returns:
    JSON string with conversion results and file paths

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
pagesNo
dpiNo
image_formatNoPNG
output_dirNo
save_to_diskNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries full burden. It discloses basic behavior (conversion, parameter defaults) but lacks details on error handling, required permissions, or memory usage for large files. Adequate but not comprehensive.

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 starts with a clear purpose, then lists parameters with explanations, followed by return type. It is well-structured and not verbose, though the returns description is somewhat vague.

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?

All 6 parameters are explained, and the return type is mentioned. Given the presence of an output schema, the description covers most aspects needed by an AI agent, though edge cases and error conditions are not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description provides all parameter meaning. It explains the pages syntax with examples, default values for dpi and image_format, and distinguishes between saving to disk vs memory.

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 states 'Convert PDF pages to images' which is a specific verb+resource combination. It clearly distinguishes from siblings like extract_pages (extract pages as PDF) and extract_page_text (extract text).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance is provided on when to use this tool vs alternatives like extract_pdf_images or split_pdf. The description only states what the tool does, not when it is appropriate.

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