Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

remove_pdf_content

Remove images, annotations, or compress streams in a PDF to reduce file size. Specify the source file and optional output path.

Instructions

Remove specific content from PDF to reduce file size.

Args:
    file_path: Path to source PDF file
    output_file: Output PDF file path (optional, auto-generated)
    remove_images: Whether to remove all images
    remove_annotations: Whether to remove annotations
    compress_streams: Whether to compress content streams
    
Returns:
    JSON string with content removal results and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
output_fileNo
remove_imagesNo
remove_annotationsNo
compress_streamsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. The description mentions removal of images and annotations and compression of streams, but does not state important aspects like whether the original file is preserved, what happens to the output file if already exists, or any required permissions. The behavioral disclosure is minimal.

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 concise with a clear top-level statement followed by structured parameter documentation. It avoids unnecessary verbosity. However, it could be slightly more front-loaded by emphasizing the primary use case (size reduction) before listing parameters.

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?

The description mentions an output JSON with results and statistics, but does not detail what those statistics are. It lacks information about file prerequisites, error conditions, or side effects. Given the complexity (5 parameters, mutation), more context would be beneficial.

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 properties lack descriptions (0% coverage), but the description's Args section provides clear explanations for each of the 5 parameters, including defaults and optionality. This adds significant meaning beyond the schema titles and types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool removes specific content from PDF to reduce file size. The verb 'remove' and resource 'specific content from PDF' are explicit. However, it does not explicitly differentiate from sibling tools like compress_pdf_images or optimize_pdf, which have overlapping goals.

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. There are no examples, no when-not-to-use instructions, and no mention of prerequisites or context. This is a significant gap, especially given the number of sibling tools.

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