Skip to main content
Glama

Extract PDF pages

pdf_extract_pages
Idempotent

Extract selected pages from a PDF and combine them into a new PDF in your specified order, without overwriting existing files.

Instructions

Copy the listed pages, in the order listed, into one new PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesPath to a PDF inside an allowed folder (absolute, or relative to the first allowed folder).
pagesYesPage numbers or ranges, such as "1, 3-5".
outputYesPath for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesYes
pagesYes
outputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description's 'one new PDF' is consistent with (and mildly reinforces) non-destructive creation, but it adds no information about permissions, allowed-folder enforcement, or the no-overwrite rule beyond what annotations and schema supply.

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?

A single sentence with no wasted words, front-loading the action and the result artifact. Nothing redundant with the title.

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 a full-coverage schema, an output schema, and annotations covering the mutation/idempotency profile, the description only needs to add the ordering semantic, which it does. It is complete enough to invoke correctly, though it says nothing about failure modes such as an already-existing output path.

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 one genuinely new semantic: the output page order follows the order given in the pages argument. That is behavior the schema's 'Page numbers or ranges, such as "1, 3-5"' does not convey.

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 specific verb and resource ('Copy the listed pages ... into one new PDF') and clarifies the output is a newly created file rather than a modification of the input. This is clearly distinct from siblings like pdf_merge or pdf_remove_pages, but no sibling is named to reinforce the distinction.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance and no alternatives are named. An agent choosing between this, pdf_split, and pdf_remove_pages gets no routing help; the only hint is that page order is preserved, which implies a reordering/reordering-subset use case.

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