Skip to main content
Glama

Extract PDF pages

pdf_extract_pages
Read-onlyIdempotent

Extract selected pages from a PDF into a new file using ranges like "1-3, 7, 10-"; leave all other pages out.

Instructions

Make one new PDF from selected pages of a PDF, e.g. "1-3, 7, 10-" (order as written, each page once). The rest of the file is left out. To reorder, duplicate or delete pages use pdf_organize. Web version: https://s3eidat.github.io/pdf-split/

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI).
pagesYesPages to keep: "1-3, 7, 10-" ("5-" = to the end; also "odd", "even", "last").
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
returnBase64NoAlso return the output as base64 in the result (only for small files). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world, so safety is covered. The description adds genuinely behavioral nuance beyond them: page order is preserved "as written" and each page appears "each page once," which clarifies how duplicates/gaps are handled. It does not discuss permissions or large-file limits, keeping it at a solid 4.

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?

Two tight sentences lead with the core operation and constraint, followed by a one-line alternative pointer. No filler; the trailing web link is the only borderline element but is compact.

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 no output schema, the description usefully signals that the result is a single new PDF with the unselected pages excluded, and the output destination is covered by the schema's `output` param. It is complete enough to invoke correctly, though it doesn't state return shape explicitly.

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. The description adds meaning not fully captured in the schema by specifying "order as written, each page once," which disambiguates whether reordering or duplicate ranges are honored in the output.

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?

States a specific verb and resource: "Make one new PDF from selected pages of a PDF," with the page-range syntax demonstrated inline. It also explicitly distinguishes itself from pdf_organize (the reorder/duplicate/delete sibling), so an agent can route correctly without opening a schema.

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?

Gives a clear when-to-use plus an explicit alternative: "To reorder, duplicate or delete pages use pdf_organize." It also scopes the operation ("The rest of the file is left out"). It stops short of naming pdf_split, the most confusable sibling for producing multiple files, so it is strong but not exhaustive routing.

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