Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

compress_pdf_images

Compress images in PDF files to reduce file size while maintaining document structure. Adjust image quality with a configurable compression level.

Instructions

Compress images in PDF while preserving document structure.

Args:
    file_path: Path to source PDF file
    output_file: Output PDF file path (optional, auto-generated)
    quality: Image compression quality (1-100, where 100=best quality)
    
Returns:
    JSON string with compression results and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
output_fileNo
qualityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description must bear full burden. It mentions preserving document structure, which is a key behavioral promise. However, it does not disclose side effects (e.g., whether input file is modified), permissions needed, or limitations. The description is moderately transparent but lacks depth.

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 extremely concise and well-structured. It opens with a clear one-line purpose, followed by a brief Args block and a Returns line. Every sentence adds value with no redundancy. The front-loading of the main action is ideal for quick scanning.

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?

Given the tool's simplicity (3 parameters, simple behavior) and the presence of an output schema (which reduces need to detail return values), the description is mostly complete. It covers parameters and behavior, but lacks usage guidelines and minor return details. The instruction allows relying on output schema, so this is acceptable.

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%, so the description must compensate. It explains all three parameters: file_path (source), output_file (optional, auto-generated), quality (1-100 with 100=best). This adds significant meaning beyond the schema's types and defaults. A slight deduction for not detailing the auto-generation logic further.

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 action: 'Compress images in PDF while preserving document structure.' This is a specific verb-resource pair that distinguishes it from sibling tools like 'optimize_pdf' (general optimization) or 'images_to_pdf' (creating PDFs). The focus on images is explicit.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention when not to use it, nor does it reference sibling tools like 'optimize_pdf' for more comprehensive compression. The context is entirely derived from the tool's name and description, offering no explicit selection criteria.

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