Skip to main content
Glama
utilitlyPDF

@utilitly/mcp

by utilitlyPDF

Extract pages

extract_pages

Extract selected pages from a PDF into a new file, preserving page order while leaving the original unchanged. Specify pages like "1-3, 5" or "4-end" and optionally an output path.

Instructions

Copies the selected pages into one new PDF, in page order, named with -pages. Writes the result as a new file next to the input (or to output_path) and never replaces an existing file; the input is left unchanged.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to a PDF file, or one starting with ~/.
pagesYesPages, such as "2", "1-3, 5" or "4-end". Commas separate parts.
output_pathNoOptional absolute path for the new PDF, ending in .pdf. It must not exist yet. By default the result goes next to the input.

Output Schema

NameRequiredDescriptionDefault
pagesYesPages in the new PDF
output_pathYesWhere the new PDF was written

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations it discloses real side effects: a new file is written next to the input by default, an existing file is never replaced, and the input PDF is left unchanged — consistent with readOnlyHint=false and destructiveHint=false and useful for deciding whether the call is safe. It does not say what actually happens when a conflicting "-pages" file already exists (error vs. renamed), which is the one behavioral detail still missing given idempotentHint=false.

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?

One front-loaded sentence opens with the operation and result file, then covers destination, overwrite behavior, and input preservation — no filler or repetition.

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 annotations, a 100%-covered schema, and an output schema, the description only needs to cover side effects and destination semantics, which it does. The unresolved edge case of a pre-existing target file name is a minor gap rather than a blocker.

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 coverage is 100% and the page-range syntax and path rules are already fully documented in the schema, so the baseline is 3. The description adds only the default output naming/destination, which slightly overlaps the output_path schema description rather than extending it.

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?

"Copies the selected pages into one new PDF" is a specific verb+resource with the output naming rule ("-pages") stated, so the agent knows exactly what artifact is produced. It stops short of differentiating from close siblings such as duplicate_pages or split_pdf, which are the most likely mix-ups for an agent selecting a 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?

The description implies the use case (pulling selected pages out into a separate file) and notes output_path as an override, but never states when to prefer this over split_pdf or duplicate_pages, and names no alternatives or exclusions. Usage has to be inferred from the sibling names.

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