Skip to main content
Glama
utilitlyPDF

@utilitly/mcp

by utilitlyPDF

Duplicate pages

duplicate_pages

Copy selected PDF pages after each original or at the end; add multiple copies, then save a new PDF and leave the input unchanged.

Instructions

Adds copies of the selected pages, right after each one or all at the end, named with -duplicated. Copies share the page's images, so the file barely grows. One call can add at most 10,000 pages. 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 copy, such as "2", "1-3, 5" or "4-end". Commas separate parts.
copiesNoExtra copies of each page. Default 1.
placementNo"after" (default) puts copies right after each page; "end" adds them at the end.
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.5/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say non-read-only, non-destructive, non-idempotent): it discloses naming convention, that images are shared so file growth is small, a hard 10,000-page cap, that a new file is created, that existing files are never overwritten, and that the input is unmodified. All of this is consistent with destructiveHint=false.

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?

Four tight sentences, front-loaded with what happens to the pages before moving to limits and side effects. Every clause carries operational information; nothing is padding.

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 and full parameter documentation already present, the description only needs to add limits and side effects, and it does: page cap, naming, shared images, non-destructive write target. An agent has everything needed to call this safely.

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 placement, copies, output_path, and pages syntax are already documented. The description restates placement and default output location rather than adding new semantics, which is the baseline case when the schema does the heavy lifting.

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?

States a specific verb and resource ("Adds copies of the selected pages") plus the exact resulting artifact (new file next to input, pages named with -duplicated). This is clearly distinct from extract_pages or merge_pdfs without needing their schemas.

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

Usage Guidelines4/5

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

Gives clear operating context: copies land after each page or at the end, capped at 10,000 pages per call, output goes to a new file. It does not name siblings or state when to prefer extract_pages/split_pdf instead, so routing between the family is left implicit.

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