Skip to main content
Glama

Split / extract pages

pdf_split

Splits a PDF into individual page files, optionally for selected pages, and writes each page to its own file in a chosen output directory.

Instructions

Write each requested page of a PDF into its own file inside out_dir.

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>"
    },
    "name": "pdf_split"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
pagesNo1-based page numbers. Omit for all pages.
out_dirNodirectory for the page files (default: scratch dir)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description bears full behavioral burden. It says files are written into out_dir, but not what happens if files already exist (overwrite vs. fail), what the output file names look like, whether the source PDF is modified, or whether any permissions are needed. For a tool whose entire effect is generating files, these omissions are significant.

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?

A single, front-loaded sentence with no filler; the core behavior and the output location both appear immediately. It is arguably too terse given the missing file-naming and overwrite behavior, but nothing in it is wasted.

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

Completeness2/5

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

For a file-generating tool with no annotations and no output schema, the description should state output naming, overwrite/collision behavior, and whether the original is touched. None of that is present, so an agent cannot predict the side effects of repeated calls.

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 67%, so the schema already documents 'pages' as 1-based page numbers (omit for all) and 'out_dir' as the target directory. The description reinforces the page-to-file mapping but adds nothing about the undocumented 'path' parameter or formatting details. Baseline 3 fits when the schema does most of the work.

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 names a concrete verb and resource: 'Write each requested page of a PDF into its own file.' That clearly conveys per-page splitting and indirectly distinguishes it from siblings like pdf_merge (combines files) and pdf_extract_text (pulls text). It stops short of explicitly naming a sibling, which keeps it out of 5 territory.

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 operation itself: hand it a PDF and an optional page list, and it produces one file per page. There is no explicit when-to-use or when-not-to-use guidance, and no pointer to pdf_extract_text for text-only extraction, leaving the choice to inference.

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