Skip to main content
Glama

Extract pages into a new PDF

pdf_pages

Extract selected pages from a PDF into a new file, preserving your specified order. The original file is not modified; supports page ranges and duplicates.

Instructions

Call this tool to pull selected pages into one new PDF, in the order written: "2,4-6" gives four pages. Asking for a page twice copies it twice. The input is never modified. Free tier: files up to 30 pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe source PDF
pagesYes1-based pages and ranges to keep, in output order, e.g. "2,4-6" or "5,1,1"
out_pathYesWhere to write the extracted PDF
overwriteNoReplace out_path if it exists. Default false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.2/5.0
Behavior4/5

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

The description adds useful behavioral context beyond the annotations: the input PDF is never modified, duplicate page requests produce duplicate pages, and free-tier files are limited to 30 pages. It does not contradict the annotations, though it leaves overwrite/failure behavior to the schema.

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?

Four short sentences, front-loaded with the core action and immediately followed by the most important edge cases. Every sentence earns its place.

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?

Given the annotations and 100% schema coverage, the description covers purpose, page-order semantics, duplicate behavior, input immutability, and tier limits. It omits return/output details, but no output schema exists and the write behavior is already well documented in the schema.

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 goes beyond the schema by clarifying that asking for the same page twice copies it twice, which is not explicit in the schema's example.

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: pull selected pages into one new PDF. The phrase 'in the order written' and the duplicate-page example distinguish it from merge, split, and reorder siblings without needing to name them.

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 by saying 'Call this tool to pull selected pages into one new PDF' and gives a free-tier size limit, but it does not explicitly say when to use this tool versus siblings such as pdf_split, pdf_merge, or pdf_reorder.

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