Skip to main content
Glama
pdf-toolkit-mcp

pdf-toolkit-mcp

by 0xmortuex

extract_pages

Copy chosen pages from a PDF into a new PDF in the order you specify, including repeated pages.

Instructions

Copy selected pages into one new PDF, in the order written ('3,1,2' reorders; '2,2' repeats).

output_path: must end in .pdf. Default: _extracted.pdf next to the input. overwrite: replace the output if it exists. Default false.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "pages": "<pages>"
    },
    "name": "extract_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
pagesYes
passwordNo
overwriteNo
output_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare this is a non-read-only, non-destructive, closed-world write. The description adds real context beyond that: it says the result is a single new PDF, that overwrite replaces an existing output (default false, i.e. non-destructive by default), and that the default output path is <name>_extracted.pdf next to the input. It does not mention behavior for encrypted inputs, which the schema's password param implies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Terse and front-loaded: the core behavior leads, followed by per-parameter notes. No filler. The line-broken parameter listing is slightly scannable-impaired but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values needn't be described. But for a 5-parameter file-mutation tool with zero schema descriptions, the definition leaves input `path` and `password` unexplained, which is a meaningful gap for handling encrypted or ambiguous inputs.

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 description coverage is 0%, so the description must carry the burden. It does well on output_path (must end in .pdf, default naming) and overwrite (default false), and explains the pages ordering syntax. However, `path` (the input PDF) and `password` (presumably for encrypted input) get no meaning at all, leaving two of five parameters uninterpretable.

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 states a concrete verb+resource: 'Copy selected pages into one new PDF,' and clarifies the ordering/repetition semantics of the pages argument. It is clear what the tool produces, though it doesn't explicitly distinguish itself from neighbors like split_pdf or merge_pdfs.

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?

Usage is implied rather than prescribed: the '3,1,2' and '2,2' examples show how to order and duplicate pages, which hints at when this tool beats a simple split. There is no explicit when-to-use/when-not guidance and no named alternative, so selection against split_pdf or merge_pdfs is left to inference.

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