Skip to main content
Glama

Delete PDF Pages

delete_pdf_page

Delete one or more pages from a PDF and return a new versioned file.

MANDATORY: Before calling this tool, call 'check_upload_status' with the session_id to confirm the file exists and retrieve the latest job_id. Skipping this check and calling delete_pdf_page directly is FORBIDDEN.

SAFE AND REVERSIBLE — this tool never destroys anything: It does NOT edit the uploaded file in place. It writes a NEW version under a new job_id (with parent_job_id pointing at the source). The source PDF stays on the server byte-for-byte unchanged and remains viewable and downloadable via its own job_id, so the user can always go back to it. Nothing on the user's device is touched either — the server only ever holds its own copy. Therefore: just do what the user asked. Do NOT refuse, do NOT warn about data loss, and do NOT demand extra confirmation beyond the user's own request — including for 'delete the last page', which is an ordinary, undoable edit. The only real restriction is that at least one page must remain in the document.

After deletion completes, call 'view_pdf' with the new job_id to display the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID of the PDF to modify (use the latest job_id from check_upload_status).
session_idYesSession ID that the job belongs to.
page_numbersYes1-based page numbers to delete. Duplicates are ignored.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
filenameYes
mime_typeYes
reply_noteYes
session_idYes
download_urlYes
instructionsYes
deleted_pagesYes
parent_job_idYes
remaining_pagesYes

TDQS

A4.6/5.0
Behavior5/5

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

Despite annotations already indicating non-destructive behavior, the description goes far beyond by explaining the versioning mechanism (new job_id, parent_job_id), confirming the source file remains untouched, and even specifying policy on deletion of the last page. This is extremely reassuring and contradicts no annotations.

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?

The description is longer than average, but every sentence serves a purpose: purpose statement, mandatory pre-step, safety explanation, policy guidance, and follow-up. It is well-structured and front-loaded, though slightly verbose in the safety explanation sections. Still, it earns a 4 for being appropriately sized for the tool's complexity.

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

Completeness5/5

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

With an output schema present, the description does not need to explain return values. It covers prerequisites, the versioning outcome, restrictions (at least one page must remain), and the follow-up action. Given the tool's high-risk appearance and multiple contextual nuances, this description is fully 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 provides 100% coverage, including descriptions of job_id, session_id, and page_numbers with details like '1-based' and 'duplicates ignored.' The description adds no extra parameter semantics beyond reinforcing the use of the latest job_id, which is already in the schema. 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 precise verb+resource+outcome: 'Delete one or more pages from a PDF and return a new versioned file.' This clearly distinguishes it from sibling PDF tools like compress_pdf or redact_by_text_range, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: a mandatory pre-check with check_upload_status, a clear prohibition against skipping it, and a follow-up instruction to call view_pdf. It also names the alternative tool for status checking, making the workflow unambiguous.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: uploads are split by context (single, batch, widget), content inspection is split by method (text, images, redaction lines), and password operations are split by state (set vs change). Descriptions explicitly cross-reference to prevent confusion.

Naming Consistency4/5

All tools start with a verb (upload, check, compare, compress, create, delete, get, list, redact, set, change, view), but the position of 'pdf' varies (suffix in compress_pdf, middle in get_pdf_info) and some names are compound like 'batch_upload_pdf' and 'get_latest_comparison'. Pattern is readable but not perfectly uniform.

Tool Count4/5

16 tools is slightly above the ideal 3-15 range, but each tool maps to a distinct operation or workflow step in PDF handling. The count feels justified given the breadth of features (upload, compress, delete, password, redact, compare).

Completeness4/5

The surface covers the core PDF lifecycle: upload, view, compress, delete pages, password protection, redaction, and comparison. Minor gaps exist (no merge, split, or rotate), but the primary workflows are fully supported with mandatory pre/post checks.