Skip to main content
Glama
shuji-bonji

pdf-writer-mcp

by shuji-bonji

Split PDF

split_pdf
Idempotent

Split a PDF into multiple files by specifying page ranges. Each range becomes a separate PDF, enabling selective extraction and reorganization of pages.

Instructions

Split a PDF into multiple files by page range. Each element of ranges becomes one file, named "1.pdf", "2.pdf", and so on. Pages are copied into a new document, so document-level information (tagged structure, XMP, attachments, AcroForm, bookmarks, etc.) is not carried over. Anything lost is reported in warnings; follow up on the output with attach_file / ensure_tagged / add_bookmarks / set_metadata as needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefixNoOutput filename prefix. Default "<input name>-part".
rangesYesArray of page ranges. Each element is "1-3" / "5" / "7-" / "-2" (1-based). Example: ["1-3", "4-"].
inputPathYesAbsolute path of the PDF to split.
outputDirYesOutput directory (absolute path).
allowBreakingSignaturesNoWhen the target is digitally signed (detected via /ByteRange), the default is an error. Set true to proceed, accepting that the signatures become invalid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.21.2

TDQS

A4.2/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing that document-level information is not carried over, that losses are reported in warnings, and by naming specific follow-up tools for repair. This is rich behavioral context that an agent would not otherwise know.

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?

Three dense sentences, each earning its place: the core action, the file naming behavior, and the critical caveat with remediation. Information is front-loaded and there is no repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-file creation tool with no output schema, the description covers naming, output location context, data-loss behavior, warnings, and recommended follow-ups. Combined with the fully documented input schema, an agent has enough to invoke it correctly and anticipate side effects.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful parameter semantics: it explains that each ranges element becomes one file and defines the naming pattern as '<prefix>1.pdf', '<prefix>2.pdf', etc. This connects ranges and prefix in a way the schema alone does not.

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 a specific verb and resource: 'Split a PDF into multiple files by page range.' It also explains the one-file-per-range behavior, which is precise. However, it does not explicitly distinguish itself from the sibling tool 'extract_pages,' so it stops short of the full 5.

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 usage is implied through the description of splitting by page range and generating multiple files. There is no explicit when-to-use or when-not-to-use guidance, nor are alternatives like 'extract_pages' mentioned. The follow-up tool list is about post-processing, not selection among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.