Skip to main content
Glama
pdf4me
by pdf4me

delete_pdf_pages

Delete specified pages from a PDF. Provide the file path and page numbers (e.g., '2', '1,3,5', or '2-4') to remove them, with optional custom output settings.

Instructions

Remove pages from a PDF using the PDF4me DeletePages API. Provide the local PDF path and pageNumbers (e.g. '2', '1,3,5', or '2-4'). Optionally set output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the PDF file.
output_dirNo
page_numbersYesPages to delete, as accepted by the API (e.g. '2', '1,3,5', '2-4').
output_file_nameNo
Behavior2/5

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

With no annotations provided, the description carries the full burden. It states 'Remove pages' but does not clarify whether the original file is modified or a new file is created, nor does it mention error behavior or permission requirements. Given output_dir/output_file_name, it implies a new output, but the destructive implications are not addressed.

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, front-loaded sentence covering action, API, and the four parameters without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is not fully complete: it omits the outcome of the operation (e.g., whether a new PDF is created, original preserved), and with no output schema or annotations, the agent cannot anticipate the tool's side effects or return value.

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 description adds value beyond the schema by giving an example format for page_numbers and naming output_dir and output_file_name, which have no schema descriptions. However, it does not explain the default behavior when these optional parameters are omitted, and file_path is already documented in the schema.

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 'Remove pages from a PDF', clearly stating the action on the resource. It differentiates from sibling tools like delete_blank_pages_from_pdf and extract_pages_from_pdf by specifying arbitrary page ranges.

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 provides concrete examples of pageNumbers format ('2', '1,3,5', '2-4'), which guides invocation. However, it does not explicitly state when to prefer this tool over alternatives such as extract_pages_from_pdf or delete_blank_pages_from_pdf.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server