Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

split_pdf

Split a PDF into multiple files by defining page ranges. Specify ranges like '1-5' to extract sections or chapters into separate documents.

Instructions

Split PDF into multiple files based on page ranges.

Args:
    file_path: Path to the source PDF file
    split_ranges: List of page ranges (e.g., ["1-5", "6-10", "11-15"])
    output_dir: Output directory (defaults to source file directory)
    prefix: Output file prefix (defaults to source filename)
    
Returns:
    JSON string with split operation results and output file information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
split_rangesYes
output_dirNo
prefixNo

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 fully disclose behaviors. It does not specify whether the original file is modified, handling of edge cases (e.g., overlapping ranges, invalid page numbers), or performance implications. The return type (JSON string) is mentioned but lacks details on structure or error responses.

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 a well-structured docstring with Args and Returns sections. It is concise and front-loaded with the core purpose. The two-sentence summary at the top is effective, but the bullet list could be slightly tightened.

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 4 parameters, 2 required, and an output schema, the description covers parameter defaults and return type. However, it lacks differentiation from sibling extract_pages, missing context on when to use each. It also omits behavioral details that an agent would need for correct invocation.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It adds meaning by explaining split_ranges with an example and stating defaults for output_dir and prefix. However, it does not clarify the file_path format (must be an existing file?) or constraints on ranges (e.g., sorted, non-overlapping).

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 'Split PDF into multiple files based on page ranges,' which uses a specific verb and resource. Among sibling tools like extract_pages, it distinguishes itself by splitting into multiple files rather than extracting pages into a single file.

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 explicit guidance on when to use this tool versus alternatives like extract_pages. It does not mention prerequisites, when not to use, or context where another tool would be more 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