Skip to main content
Glama
Paperboy

Paperboy

Official
by sudostash

extract_images

DestructiveIdempotent

Save images embedded in a PDF as separate files, such as page001-image01.png, with options to limit pages, skip small icons, and bypass password protection.

Instructions

Save the pictures in a PDF as image files, in a folder (default: "_images" next to it), named page001-image01.png and so on. pages limits it to a page spec (e.g. "1-3,7"); min_size (pixels) leaves out images narrower or shorter than that, such as icons and rules. Photos are usually saved as the original JPEG; others as PNG (or the format the image is stored in). An image used on several pages is saved once. Images drawn by pages and the forms on them are found; inline images and those inside annotations, patterns or Type 3 fonts are not. Images that are damaged, suspicious (data that doesn't match their size), over 40 million pixels, or past 400 million pixels per call are listed in skipped; only the first 2,000 are read (truncated). Saved files are not password-protected, even if the PDF is. Needs the owner password if the PDF forbids copying.

Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.

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": {
      "input_path": "<input_path>"
    },
    "name": "extract_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
pagesNo
min_sizeNo
passwordNo
overwriteNo
input_pathYes
output_dirNo

Output Schema

NameRequiredDescriptionDefault
imagesYes
skippedYes
truncatedYes
output_dirYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing output format per source type (original JPEG vs PNG), deduplication across pages, capacity limits (2,000 images, 40M/400M pixel caps), a skipped list for damaged or suspicious images, and that output files are not password-protected while the owner password may be required if the PDF forbids copying. The notable gap is that the destructiveHint=true annotation is never explained: the `overwrite` behavior toward existing files is unaddressed.

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?

Dense but front-loaded: the action, destination, and file naming come first, then constraints, edge cases, and limits in roughly priority order. Every sentence conveys a distinct behavioral fact with no filler.

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?

For a six-parameter extraction tool with an output schema, this covers nearly everything an agent needs: formats, limits, failure modes (skipped/truncated), and security requirements. The remaining hole is the overwrite/destructive behavior, which matters given destructiveHint=true.

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?

At 0% schema coverage the description carries the full burden and mostly succeeds: it documents pages syntax ("1-3,7"), min_size as a pixel threshold with examples of what it filters, password including the "ask" local-entry mechanism, and output_dir's default naming. Only `overwrite` and the input_path format go unexplained.

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 ("Save the pictures in a PDF as image files") plus the output naming convention (page001-image01.png) and destination folder, which lets an agent distinguish it from siblings like extract_pages, extract_text, or extract_attachments without reading 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 operational context — a page-spec filter, a minimum-size filter to exclude icons and rules, and the note that images drawn by pages and form images are found while inline/annotation/pattern/Type 3 font images are not. It never explicitly routes the agent to an alternative sibling (e.g. extract_attachments for embedded files), so it stops short of a 5.

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