Skip to main content
Glama

PDF Efforts

Delete PDF pages

delete_pages
Idempotent

Remove pages from a PDF. The remaining pages are copied unchanged.

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": {
      "file": "<file>",
      "pages": "<pages>"
    },
    "name": "delete_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF.
pagesYesPages to delete: "all", or numbers and ranges such as "1-3, 5, 8-end" ("end" = last page).

Output Schema

NameRequiredDescriptionDefault
infoNoFacts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf).
noteNoAnything the user should know about the result.
textNoExtracted text (pdf_to_text, ocr_pdf).
filesYesResult files. Download them before expires_at; pass file_id to another tool to chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true. The line "The remaining pages are copied unchanged" adds real value by implying a new file is produced and untouched pages survive byte-for-byte, which is consistent with destructiveHint=false. It still does not say what happens to the source file, whether all-pages deletion is allowed, or what the output contains.

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 short sentences, front-loaded with the action and followed by the one behavioral fact worth knowing. Nothing is padded or repeated.

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 and both parameters are fully documented, so the description only needs to frame the operation, which it does. Minor gaps remain around output naming and edge cases like deleting every page, but nothing blocks a correct call.

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 coverage is 100%, so the file object and the pages range syntax ("1-3, 5, 8-end", "all") are already documented in the schema. The description adds nothing beyond that, which meets the baseline for a fully documented schema.

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 names a specific verb and resource ("Remove pages from a PDF"), which is unambiguous on its own. It does not distinguish this from nearby siblings that also carve up a PDF (extract_pages, split_pdf), but the operation itself is clear.

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?

There is no guidance on when to choose this over extract_pages or split_pdf, nor any note on prerequisites or limits. The agent must infer the selection rule from tool names alone.

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