Skip to main content
Glama
shuji-bonji

pdf-writer-mcp

by shuji-bonji

Delete Pages

delete_pages
DestructiveIdempotent

Remove specified pages from a PDF and save a new file. Reports lost document-level data so you can restore bookmarks, metadata, or form fields as needed.

Instructions

Create a new PDF with the given pages removed. Deleting every page is an error. Pages are copied into a new document, so document-level information (tagged structure, XMP, attachments, AcroForm, bookmarks, etc.) is not carried over. Anything lost is reported in warnings; follow up on the output with attach_file / ensure_tagged / add_bookmarks / set_metadata as needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYesPages to delete, "1,3-5,8-" (1-based).
inputPathYesAbsolute path of the target PDF.
outputPathNoDestination file path (absolute). When omitted, a base64 string is returned instead.
returnBase64NoWhen true, include a base64 string in the result in addition to saving.
allowBreakingSignaturesNoWhen the target is digitally signed (detected via /ByteRange), the default is an error. Set true to proceed, accepting that the signatures become invalid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.21.2

TDQS

A4/5.0
Behavior5/5

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

With annotations already marking the tool as destructive and non-read-only, the description adds substantial behavioral context: it states that pages are copied into a new document, that document-level information (tagged structure, XMP, attachments, AcroForm, bookmarks) is not carried over, that losses are reported in warnings, and that follow-up actions are needed. It also discloses the error condition for deleting all pages and the signature-breaking behavior via the allowBreakingSignatures parameter. This goes well beyond the annotations.

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 two sentences long and front-loads the primary action immediately. Every clause contributes value: the operation, the error condition, the loss of metadata, and the follow-up guidance. There is zero redundancy or filler.

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?

The description covers the essential behavioral aspects: what the tool does, what it destroys, error conditions, and what to do afterward. The return format is not explicitly described, but the schema covers outputPath and returnBase64, so that gap is acceptable. Given the tool's complexity (5 params, no output schema), the description is thorough and leaves little ambiguity for an agent deciding to call 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 100%, so all five parameters are already documented. The description adds a meaningful constraint ('Deleting every page is an error') that isn't in the schema, but it does not elaborate on parameter meaning or format beyond that. The description adds marginal value over the schema, so a baseline 3 is appropriate.

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 opens with a specific verb-resource pair ('Create a new PDF with the given pages removed') that precisely defines the operation. It also states a key error condition ('Deleting every page is an error') and explicitly distinguishes the tool from siblings by describing the outcome as a new PDF with pages removed, which is distinct from extract or reorder. The purpose 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?

The description does not explicitly tell the agent when to choose this tool over alternatives like extract_pages or reorder_pages. It implies the use case (removing pages) but provides no comparison or conditions for selection. It also doesn't mention any prerequisites or complementary tools, only suggests follow-up tools for lost metadata, which is post-processing advice rather than selection guidance.

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