Skip to main content
Glama
pdf-toolkit-mcp

pdf-toolkit-mcp

by 0xmortuex

split_pdf

Split a PDF into separate files by comma-separated page ranges, such as 1-3,5,7-, while leaving the original untouched and checking output names before writing.

Instructions

Split a PDF into several files. Each comma-separated part of ranges becomes one file, e.g. '1-3,5,7-' makes three files (pages 1-3, page 5, page 7 to the end). Files are named _part_p.pdf. The original is untouched. All names are checked before anything is written, so a conflict never leaves a half-done split.

output_dir: default is the input's folder. Created if missing. overwrite: replace existing outputs. Default false.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "ranges": "<ranges>"
    },
    "name": "split_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
rangesYes
passwordNo
overwriteNo
output_dirNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description is consistent with that: it explicitly states 'The original is untouched' and that overwriting is opt-in via overwrite (default false). It goes beyond the annotations by disclosing the output naming scheme (<name>_part<k>_p<pages>.pdf) and the all-or-nothing conflict pre-check, though it says nothing about failure behavior for invalid ranges or encrypted inputs.

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 core behavior and the range example are front-loaded, followed by clean per-parameter notes for the two non-obvious options. Every sentence carries information — naming, atomicity, defaults — with no restatement of the title or filler.

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?

With an output schema present, return values need not be explained, and for a five-parameter write tool the description covers the operation, naming, defaults, and conflict safety well. It falls short only on the password parameter and on what happens when a range is malformed, which an agent may need to handle.

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 carries the burden, and it does so for the most important parameters: ranges is defined operationally with a worked example ('1-3,5,7-' makes three files), output_dir gets a default plus 'Created if missing', and overwrite gets a meaning plus default. The password parameter is never mentioned, and path is left to the obvious, which is the remaining gap.

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 opening sentence states a specific verb and resource ('Split a PDF into several files'), and the range-to-file mapping example makes the operation concrete. It implicitly separates itself from merge_pdfs and single-file extraction by describing one output file per comma-separated part, but it never names an alternative tool, so an agent must infer that routing.

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

Usage Guidelines4/5

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

The multi-file output model gives clear context for when this tool applies, and the note on conflict checking ('All names are checked before anything is written') tells the agent it is safe to run without pre-flighting. It offers no explicit exclusions or named alternatives, which is the only thing keeping this below a 5.

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