Skip to main content
Glama

docs

Pdf Pages

pdf_pages
Idempotent

Extract pages from a PDF by 1-based ranges (e.g. 1-3,7) into a new PDF. Deterministic, $0.002.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute http(s) URL of the input (web page or PDF, per tool)
pagesYes1-based page ranges, e.g. '1-3,7'
x_paymentNoOptional: base64 X-PAYMENT header value (x402 exact scheme, USDC on Base mainnet). Omit it to receive the payment requirements (accepts[] + docs) for this call without being charged.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesJSON body of the underlying call (see /samples/{product} for each product's shape)
statusYesHTTP status of the underlying call (200 result, 402 payment terms, 4xx input error)
how_to_payNo
receipt_idNoset on paid results; free re-fetch via get_receipt
payment_requiredNotrue when status is 402: body holds x402 payment terms, not a result. Pay and call again with x_payment

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), and the description adds genuinely new behavioral context: a fixed $0.002 cost and the fact that output goes 'into a new PDF' (input is not mutated). It does not disclose error behavior for invalid ranges or payment-flow details beyond what the x_payment schema param already says.

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 tight sentences, front-loaded with the action and scope, followed by the differentiators (deterministic, cost). No filler or redundancy.

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?

An output schema exists so return values need no explanation, and the description covers purpose, cost, and non-destructive output. It is slightly incomplete on error handling for malformed ranges and on how it relates to sibling PDF tools, but adequate for a simple, well-annotated extraction tool.

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 url, pages, and x_payment. The description's '1-based ranges (e.g. 1-3,7)' merely restates the pages schema description, adding no syntax or edge-case meaning beyond it.

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 (Extract), resource (pages from a PDF), input format (1-based ranges), and output (a new PDF), which lets an agent separate it from siblings like pdf_merge or pdf_info by function. It stops short of naming those siblings explicitly, so there is no direct differentiation.

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 purpose implies when the tool applies (you have a PDF and want a subset of pages), but there is no explicit when-to-use vs alternatives guidance and no mention of when to prefer pdf_merge or pdf_info. Usage is left to inference from the description.

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