Skip to main content
Glama

pdf-tools

extract_pages

Extract the given pages into a new PDF (original order). Returns base64.

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": {
      "file": "<file>",
      "pages": "<pages>"
    },
    "name": "extract_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF file, base64-encoded (max 10 MB)
pagesYesPage list like "2, 5-7" (1-based)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It usefully discloses that a new PDF is produced with original page order and that the return value is base64, but it does not mention side effects on the input, invalid page handling, or error cases.

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?

The description is a single, dense sentence that conveys the action, the scope, the ordering behavior, and the return format with no wasted words. The most important information is up front.

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 two-parameter tool with complete schema coverage, the description provides the key behavioral facts: extraction into a new PDF, original order preservation, and base64 return. It does not cover edge cases or error behavior, but the core calling context is sufficiently complete.

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?

The input schema already documents both parameters fully, including the base64 format and page list syntax. The description adds no additional parameter-level detail, so the schema carries the explanatory weight and the baseline score applies.

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 states a specific verb ('Extract'), a resource ('pages'), and the result ('a new PDF'), making the operation clear. The phrase 'original order' adds useful precision and helps distinguish this from related tools like remove_pages or split_pdf.

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 description implies the tool is for creating a new PDF from a subset of pages in their original order, but it does not explicitly state when to prefer it over alternatives like remove_pages or split_pdf. Usage context is inferable but not directly spelled out.

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