Skip to main content
Glama

Save pages as images

pdf_to_images
Idempotent

Save every or selected PDF pages as PNG or JPEG images in a folder, with page, DPI, and format options. Use them to share, present, or inspect page layouts.

Instructions

Saves every page, or the chosen pages, of a PDF as PNG or JPEG images named -01.png, -02.png, ... (by page number) in an existing folder, and lists the files with their pixel sizes. Use it to share a page as a picture, insert it into a slide or chat, or look at a page's layout; to read the text, use extract_text, and to make a smaller PDF, use compress_pdf. The PDF is not changed; existing images are only replaced with overwrite: true. Encrypted PDFs cannot be converted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNoResolution, 36 to 600 (default 150; 72 is screen size, 300 is print quality).
pathYesAbsolute path of the PDF.
pagesNoPages as 1-based numbers and ranges, e.g. "1-3,5". All pages when omitted; a page outside the document is an error.
formatNopng (default) is sharp for text and drawings; jpeg is smaller for photos and scans.
passwordNoPassword, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it.
base_nameNoStart of the file names (default: the PDF's name).
overwriteNoAllow replacing an existing file (default false).
output_dirYesAbsolute path of an existing folder for the images.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.9

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare idempotentHint=true and destructiveHint=false, and the description adds real context beyond them: the source PDF is not modified, existing images are only replaced with overwrite: true, and encrypted PDFs cannot be converted. It also describes the return (files listed with pixel sizes) despite having no output schema.

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?

Front-loaded with the core action and output convention, then use cases, then alternatives, then caveats. The opening sentence is dense and long, but each clause carries information an agent needs; there is no filler.

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?

Covers output format/naming, return summary, mutation semantics, overwrite behavior, and the encryption limitation. With no output schema, the description still supplies everything needed to invoke the 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 baseline is 3, but the description adds semantics beyond the schema: the page selection maps to the <base>-NN naming convention, and overwrite is tied explicitly to replacement of existing images. It adds some meaning without restating every field.

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+resource (saves PDF pages as PNG/JPEG images) and even specifies the output naming pattern. It explicitly distinguishes itself from extract_text (read text) and compress_pdf (smaller PDF), so an agent can route correctly without opening a schema.

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?

Gives concrete use cases (share a page as a picture, insert into a slide or chat, inspect layout) and names the alternatives for the adjacent intents: extract_text for text and compress_pdf for shrinking. Both when-to-use and when-to-use-something-else are covered.

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