Skip to main content
Glama

pdf_extract_pages

Extract selected pages from a PDF into a new PDF file. Specify page ranges like 1,3,5-7 and an output path to create a focused document.

Instructions

Extracts specific pages into a new PDF. [Input: PDF (.pdf) | Output: PDF (.pdf)]

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": {
      "input": "<input>",
      "pages": "<pages>",
      "output": "<output>"
    },
    "name": "pdf_extract_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesThe input PDF file path.
pagesYesThe pages to extract, e.g., '1,3,5-7'.
outputYesFile path for the extracted output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. 'Into a new PDF' implies the source is left intact, but nothing is said about whether the output path is overwritten if it already exists, whether page numbers are 1-based, or what happens for out-of-range or duplicated pages.

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?

Two short, front-loaded segments with no filler; the verb-and-resource statement comes first and the format note second. The bracketed format string is mildly redundant with the schema but still compact and skimmable.

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 simple three-parameter extraction tool with full schema coverage and no output schema, the definition covers what the tool produces and where it writes it. The remaining gaps are edge-case behaviors (overwrite policy, invalid page handling), which are secondary for a tool this straightforward.

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%, so the schema already documents input, pages, and output with an example page-range syntax ('1,3,5-7'). The description's '[Input: PDF | Output: PDF]' line only restates format constraints already implied by the parameter names, adding no new semantic detail.

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?

States a specific verb and resource ('Extracts specific pages into a new PDF'), which is enough to distinguish it from mutation siblings like pdf_delete_pages or pdf_reorder_pages since the result is a new file. It stops short of naming an alternative for overlapping cases such as pdf_split or pdf_chunk-style operations, but the purpose itself is unambiguous.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no statement of when not to use it, and no named alternative among the many sibling PDF tools. The agent must infer from the name alone that this is for pulling a page subset rather than splitting, bursting, or deleting pages.

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