Skip to main content
Glama

pdf_extract_pages

Extract selected pages from a PDF (like '2-4,7') into a new file while leaving the original unchanged.

Instructions

Keep only some pages (like '2-4,7') in a new PDF. The original stays as it is.

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": "pdf_extract_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
pagesYes
outputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it does disclose the important non-destructive trait ('The original stays as it is'), which is genuinely useful. However, it says nothing about where the new file is written by default, overwrite behavior, or what happens for out-of-range 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 sentences, front-loaded with the core action and followed by the syntax example. Every sentence adds information, though the phrasing 'The original stays as it is' is slightly colloquial.

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?

For a simple three-parameter file tool with no annotations or output schema, the description covers purpose, syntax, and source-file safety. It falls short on output location/default behavior and on whether the tool returns anything, which an agent needs before invoking it.

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 compensate. It adds real value for the least obvious parameter by giving the page syntax with the example '2-4,7', but leaves 'path' and the 'output' parameter (default empty string) unexplained, including where output lands when omitted.

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 gives a specific verb and resource ('Keep only some pages ... in a new PDF') and an inline example of the page-range syntax. It is clearly distinguishable from siblings like pdf_merge or pdf_text, though it does not explicitly name those alternatives.

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 use case is implied by 'keep only some pages in a new PDF', but there is no explicit when-to-use vs. when-not guidance and no mention of related tools such as pdf_merge. An agent can infer the purpose but must guess at alternatives.

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