Skip to main content
Glama

Extract pages into a new PDF

pdf_pages

Extract selected pages from a PDF and combine them into one new PDF. Specify pages or ranges in the desired output order; source file remains unchanged.

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.4/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden of behavioral disclosure. It usefully states that the input PDF is never modified, that duplicate page requests are copied twice, and that the free tier supports files up to 30 pages. These are genuinely helpful behavioral traits beyond 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, all substantive: purpose, ordering example, duplicate behavior, input safety, and a size limit. The primary action is front-loaded, and no word is wasted.

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?

For a four-parameter tool with no output schema, the description covers the essential operational semantics: how page selection works, why duplicates matter, and that the source is untouched. The optional overwrite flag is already explained in the schema. It does not discuss failure modes, but that is acceptable given the tool's simplicity.

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 each parameter already has a description. The description adds value on top by illustrating the count interpretation ('2,4-6' gives four pages) and emphasizing duplicate copying behavior for the pages parameter. This reinforces and clarifies the schema rather than simply repeating it.

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?

The description opens with an explicit verb and resource: 'pull selected pages into one new PDF'. This clearly states the action and distinct scope, differentiating it from merge-all or split-into-multiple tools like pdf_merge or pdf_split. The detail 'in the order written' further clarifies a unique behavior.

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?

The description gives a direct call-to-action ('Call this tool to pull selected pages into one new PDF') and a concrete page-range example, so the agent knows exactly when to invoke it. It does not explicitly name alternative tools or exclusion criteria, but the context is clear enough to route the call.

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

Install Server

Other Tools