Skip to main content
Glama

Split a PDF into several files

pdf_split

Split a PDF into separate files by page ranges, writing one new PDF per range while leaving the original untouched. Use 1-based ranges like "1-3,5,7-" to extract pages into named outputs.

Instructions

Call this tool to write one new PDF per range. Ranges are 1-based and may be open-ended: "1-3,5,7-" gives pages 1-3, page 5, and 7 to the end. The input is never modified. Free tier: files up to 30 pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe PDF to split
rangesYesComma-separated 1-based page ranges, e.g. "1-3,5,7-". An open-ended range runs to the last page
overwriteNoReplace existing outputs. Default false: nothing is overwritten and nothing is written at all if any target exists
out_path_patternYesOutput path with a placeholder: {n} is the part number (1, 2, 3...), {range} is the range itself (e.g. 1-3), {name} is the input file name without .pdf. Example: ~/out/{name}-{range}.pdf

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A3.6/5.0
Behavior4/5

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

With annotations already declaring readOnlyHint=false and destructiveHint=false, the description usefully adds that 'the input is never modified' and discloses a free-tier limit of 30 pages, which are real operational constraints not present in the structured fields. It stops short of describing the return value or how partial failures across multiple output files are handled.

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?

Three short sentences, front-loaded with the action and immediately followed by the range semantics and the safety guarantee. No filler, though the range example duplicates the schema verbatim.

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?

Covers the operation, range syntax, non-destructiveness of the input, and a tier limit, but with no output schema and four parameters it never says what the tool returns (e.g., the list of written file paths) or how the {n}/{range}/{name} pattern interacts with multiple ranges. Adequate but with a visible gap for a multi-file write tool.

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 description coverage is 100%, so the baseline is 3. The description restates the ranges format already fully documented in the schema and says nothing about out_path_pattern or overwrite, so it adds no meaning beyond the structured fields.

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?

States a specific action and outcome: 'write one new PDF per range', which clearly identifies a split operation on a PDF resource. An agent can distinguish it from read-oriented siblings like pdf_text or pdf_info, though it never explicitly contrasts itself with pdf_merge (the other multi-file write tool).

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?

Usage is implied by the verb ('Call this tool to write one new PDF per range') and the description supplies a concrete range syntax example, but there is no when-to-use vs when-not guidance and no alternative named among the many pdf_* siblings. The free-tier note hints at a scope boundary but not a routing rule.

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

Deploy Server

Other Tools