Skip to main content
Glama
utilitlyPDF

@utilitly/mcp

by utilitlyPDF

Delete pages

delete_pages

Remove selected pages from a PDF and save the remaining pages as a new -trimmed file, leaving the original unchanged.

Instructions

Removes the selected pages and keeps the rest in order, named with -trimmed. At least one page must remain. Writes the result as a new file next to the input (or to output_path) and never replaces an existing file; the input is left unchanged.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to a PDF file, or one starting with ~/.
pagesYesPages to remove, such as "2", "1-3, 5" or "4-end". Commas separate parts.
output_pathNoOptional absolute path for the new PDF, ending in .pdf. It must not exist yet. By default the result goes next to the input.

Output Schema

NameRequiredDescriptionDefault
pagesYesPages in the new PDF
output_pathYesWhere the new PDF was written

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Explains that the result is written as a new file next to the input (or to output_path), that it never replaces an existing file, and that the input is left unchanged — this directly explains why destructiveHint=false despite a mutation, which annotations alone would not convey. It also discloses the constraint that at least one page must remain.

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?

Three compact sentences, front-loaded with the action and output naming, then the constraint, then the file-writing behavior. No filler and no repetition of schema text.

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?

An output schema exists, so return values needn't be described. The description covers the side effects, output location, safety constraint, and a precondition — everything an agent needs to call this mutation tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema documents path, pages, and output_path. The description still adds value by stating the default output location, the '-trimmed' naming convention, and the rule that an existing file is never overwritten, which reinforces the schema's 'must not exist yet' constraint.

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+resource ('Removes the selected pages') and adds a distinguishing behavior — surviving pages are kept in order and the output is named with '-trimmed'. It doesn't explicitly contrast with close siblings like extract_pages or split_pdf, so it stops short of full sibling 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?

'At least one page must remain' gives a clear precondition for when this tool can be used, and the output_path note implies the default case. However, there is no explicit routing to alternatives (e.g., use extract_pages to keep only a subset) and no statement of when not to use it.

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