Skip to main content
Glama
Nizoka

pdfnative-mcp

Extract pages into one PDF

extract_pages
Idempotent

Extract specified pages from a PDF into a single new document, removing signatures and forms but preserving URI links.

Instructions

Extract an arbitrary subset of pages (0-based, in the order given) from a PDF into a SINGLE new document (pdfnative v1.4 page-tree API). The output is a fresh, self-contained PDF (signatures/AcroForm dropped; URI links kept unless dropAnnotations=true). Encrypted sources are rejected (ENCRYPTED_SOURCE). Use split_pdf instead when you need several output PDFs (one per range).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYes0-based page indices to keep, in output order. Duplicates and out-of-range indices are rejected.
pdfBase64YesBase64-encoded source PDF. Must not be encrypted.
outputModeNobase64
outputPathNo
dropAnnotationsNoWhen true, drop ALL annotations. Default keeps self-contained URI link annotations.
maxOutputSizeBytesNoMaximum size, in bytes, of the produced PDF. Defaults to 268435456 (256 MiB).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
filePathNoAbsolute sandboxed file path (when mode='file').
sizeBytesYes
Behavior5/5

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

The description adds significant behavioral context beyond annotations: output is a fresh self-contained PDF, signatures/AcroForm dropped, URI links kept unless dropAnnotations=true, encrypted sources rejected. This covers mutation details and limitations.

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?

Three sentences: first gives main purpose, second adds technical details, third provides alternative. No unnecessary words, front-loaded with the core action.

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 6 parameters (2 required) and an output schema, the description covers key behavior, encryption constraint, and usage alternative. It lacks explicit guidance on output paths or size limits, but output schema may cover return values. Fairly complete for a non-trivial tool.

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 67%, so baseline is 3. The description adds clarification for `pages` (0-based, order matters) and `dropAnnotations` (what happens when true/false). However, it doesn't add meaning for `outputMode` or `maxOutputSizeBytes`, which are well-described in schema.

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 clearly states the verb 'extract', the resource 'pages from a PDF', and the key outcome 'into a SINGLE new document'. It also distinguishes itself from the sibling tool `split_pdf` by specifying when to use each.

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

Usage Guidelines5/5

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

Explicitly tells when to use this tool versus `split_pdf`: 'Use split_pdf instead when you need several output PDFs (one per range).' Also mentions that encrypted sources are rejected, providing clear constraints.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nizoka/pdfnative-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server