Skip to main content
Glama

Pdf Extract Pages

pdf_extract_pages
Destructive

Use this to extract a requested page range from a selected local PDF into an output PDF. Validate page numbers and output path; source pages remain unchanged.

Input Schema

NameRequiredDescriptionDefault
pathYesPermitted local filesystem path.
pagesYesPage list/ranges such as 1-3,5.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
outputYesOptional permitted output path; when omitted the tool may update the input according to its action.
patternNoOutput filename pattern where supported.
output_dirNoPermitted directory for generated output files.

Output Schema

NameRequiredDescriptionDefault
dataNoPDF action structured result for pdf_action. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "device",
      -  "pages"
      -]New value: +[
      +  "device",
      +  "path",
      +  "pages",
      +  "output"
      +]
  2. Added

TDQS

A3.5/5.0
Behavior3/5

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

The description adds useful context that source pages remain unchanged and that page numbers/output path are validated. However, annotations already declare destructiveHint=true, and the description does not explain that risk (e.g., overwriting an existing output file), leaving a gap for a mutation tool.

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?

Two sentences, front-loaded with purpose and immediately followed by the key operational note about validation and source preservation. Nothing is redundant or buried.

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?

The description covers the core behavior and notes that source pages are unchanged, and an output schema exists to explain return values. But for a tool annotated as destructive, it omits any warning about output overwrite behavior or requirements around the output path, leaving a meaningful behavioral gap.

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 100%, so the schema already documents every parameter, including page range syntax ('1-3,5') and device requirements. The description only echoes high-level concepts like page range and output path without adding syntax or edge-case 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?

The description states a specific verb and resource ('extract a requested page range from a selected local PDF into an output PDF'), so an agent can tell what the tool does. It does not explicitly differentiate from sibling PDF tools such as pdf_split or pdf_merge, but the scope is clear enough to infer the distinction.

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 phrase 'Use this to extract...' gives an implied usage context, but there is no explicit guidance on when to prefer this tool over alternatives like pdf_split, nor any exclusions or preconditions beyond 'selected local PDF'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources