Skip to main content
Glama

pdf_to_images

PDF to Images — Rasterize PDF pages to PNG / JPG / WEBP / TIFF (and AVIF, Starter+). Supports page ranges, quality/DPI controls, grayscale/mono color modes, transparent output, custom background color, max-dimension cap, area crop, text watermark, custom filename patterns, contact-sheet/filmstrip tile mode (Starter+), preset profiles (web/print/email/archive), and JSON / MinIO URL response modes. [category: pdf]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNoOut-of-range values clamp silently to 30-600 — never an error. Non-numeric is ignored and stays 150.
cropNoArea crop in PDF points: 'x,y,w,h'
fileYesInput PDF
modeNosheet/filmstrip require Starter+pages
pagesNoPage range e.g. 1-3,5,7-9. Empty = all.
formatNoAliases jpeg/tif accepted; unknown values silently stay png. avif is Starter+ — Free tier gets a 402.png
presetNoA ready-made bundle of settings. Anything you set yourself wins over the preset.
maxWidthNoShrink-only width cap in pixels, aspect preserved. Leave blank for no cap — an explicit 0 clamps UP to 100 and shrinks every page.
responseNourls mode requires Starter+ and authenticationzip
sheetGapNoSpacing between the tiles, in pixels.
colorModeNomono+jpg has no 1-bit JPEG — it silently renders grayscale and sets X-Color-Mode-Adjusted. Unknown values fall back to rgb.rgb
maxHeightNoShrink-only height cap in pixels, aspect preserved. Omit for no cap — an explicit 0 clamps UP to 100 and shrinks every page.
avifQualityNoHigher keeps more detail and makes a bigger file.
jpegQualityNoHigher keeps more detail and makes a bigger file. 50 is the lowest this tool will go.
namePatternNoFilename template with {basename}/{page}/{page:03d}/{dpi}/{format}/{date} tokens
transparentNoLeave the paper see-through instead of white.
webpQualityNoHigher keeps more detail and makes a bigger file.
sheetColumnsNoHow many pages sit side by side on the contact sheet.
watermarkFontNoOutside the enum it silently becomes Helvetica. Does nothing unless watermarkText is set.Helvetica
watermarkTextNoOptional text watermark stamped on each image
watermarkTileNoNot used by this tool - a rasterised page is stamped once, where Watermark position says.
watermarkColorNoHex color, #rgb or #rrggbb.#808080
watermarkScaleNoNot used by this tool — size the stamp with Watermark font size.
backgroundColorNoWhat fills the see-through parts of the page in a format that cannot keep them.#FFFFFF
sheetBackgroundNoColour of the canvas behind the tiles, as #rgb or #rrggbb. Anything we cannot read stays white.#FFFFFF
tiffCompressionNoHow the TIFF is packed down.lzw
watermarkOpacityNo0 invisible to 1 solid; out-of-range clamps. NOT a percent — 50 renders fully opaque. Needs watermarkText.
watermarkFontSizeNoSize of the stamped text in PIXELS of the rasterised page: it is annotated onto the bitmap at ImageMagick's 72 dpi default, so at dpi=300 the same number covers ~4x less of the page than it would inside a PDF. Needs watermarkText.
watermarkPositionNoWhere the stamp sits on each image.c
watermarkRotationNoInteger degrees only — a decimal like '45.5' silently resets to 45. Needs watermarkText.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / pages / title
      Added value: +"Pages to convert"
    • addedInput schema / properties / pages / x-ui
      Added value: +{
      +  "no_recall": true,
      +  "page_select": {}
      +}
  2. Changed1 schema field changed
    • removedInput schema / properties / namePattern / x-ui
      Removed value: -{
      -  "unset_label": "page_0001, page_0002, …"
      -}
  3. Changed2 schema fields changed
    • addedInput schema / properties / maxWidth / x-ui / pair_label
      Added value: +"Fit inside"
    • addedInput schema / properties / maxWidth / x-ui / pair_with
      Added value: +"maxHeight"
  4. Changed3 schema fields changed
    • addedInput schema / properties / crop / x-ui
      Added value: +{
      +  "unset_label": "No cropping"
      +}
    • addedInput schema / properties / namePattern / x-ui
      Added value: +{
      +  "unset_label": "page_0001, page_0002, …"
      +}
    • addedInput schema / properties / watermarkText / x-ui
      Added value: +{
      +  "unset_label": "No watermark"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / properties / preset / x-ui / unset_label
      Added value: +"No preset"
    • changedInput schema / properties / watermarkFontSize / description
      Previous value: -"Points against the bitmap's 72dpi density — at dpi=300 text is ~4x smaller on the page than in a PDF. Needs watermarkText."New value: +"Size of the stamped text in PIXELS of the rasterised page: it is annotated onto the bitmap at ImageMagick's 72 dpi default, so at dpi=300 the same number covers ~4x less of the page than it would inside a PDF. Needs watermarkText."
  6. Changed6 schema fields changed
    • addedInput schema / properties / dpi / x-ui
      Added value: +{
      +  "unit": "dpi"
      +}
    • addedInput schema / properties / maxHeight / x-ui
      Added value: +{
      +  "unit": "px"
      +}
    • addedInput schema / properties / maxWidth / x-ui
      Added value: +{
      +  "unit": "px"
      +}
    • addedInput schema / properties / sheetGap / x-ui
      Added value: +{
      +  "unit": "px"
      +}
    • addedInput schema / properties / watermarkFontSize / x-ui
      Added value: +{
      +  "unit": "px"
      +}
    • addedInput schema / properties / watermarkRotation / x-ui
      Added value: +{
      +  "unit": "deg"
      +}
  7. Changed30 schema fields changed
    • changedInput schema / properties / avifQuality / description
      Previous value: -"AVIF quality (Starter+)"New value: +"Higher keeps more detail and makes a bigger file."
    • addedInput schema / properties / avifQuality / x-show-when
      Added value: +{
      +  "format": [
      +    "avif"
      +  ]
      +}
    • changedInput schema / properties / backgroundColor / description
      Previous value: -"Background for transparent PDFs rendered to non-alpha formats"New value: +"What fills the see-through parts of the page in a format that cannot keep them."
    • addedInput schema / properties / backgroundColor / x-show-when
      Added value: +{
      +  "format": [
      +    "jpg",
      +    "webp"
      +  ]
      +}
    • changedInput schema / properties / jpegQuality / description
      Previous value: -"Consulted only when format=jpg. Out-of-range clamps silently to 50-95 — this is not a 0-100 scale."New value: +"Higher keeps more detail and makes a bigger file. 50 is the lowest this tool will go."
    • addedInput schema / properties / jpegQuality / x-show-when
      Added value: +{
      +  "format": [
      +    "jpg",
      +    "tiff"
      +  ]
      +}
    • changedInput schema / properties / maxWidth / description
      Previous value: -"Cap width (shrink-only, preserves aspect)"New value: +"Shrink-only width cap in pixels, aspect preserved. Leave blank for no cap — an explicit 0 clamps UP to 100 and shrinks every page."
    • changedInput schema / properties / preset / description
      Previous value: -"One-click preset bundle. Explicit fields override preset values."New value: +"A ready-made bundle of settings. Anything you set yourself wins over the preset."
    • changedInput schema / properties / preset / enum
      Previous value: -[
      -  "",
      -  "web",
      -  "print",
      -  "email",
      -  "archive"
      -]New value: +[
      +  "web",
      +  "print",
      +  "email",
      +  "archive"
      +]
    • addedInput schema / properties / preset / x-ui
      Added value: +{
      +  "labels": {
      +    "archive": "For keeping (PNG, 300 DPI)",
      +    "email": "For emailing (JPG, 150 DPI)",
      +    "print": "For printing (PNG, 300 DPI)",
      +    "web": "For a web page (WEBP, 96 DPI)"
      +  }
      +}
    • changedInput schema / properties / sheetBackground / description
      Previous value: -"Canvas color behind tiles, sheet/filmstrip modes only. #rgb or #rrggbb; invalid hex silently keeps #FFFFFF."New value: +"Colour of the canvas behind the tiles, as #rgb or #rrggbb. Anything we cannot read stays white."
    • addedInput schema / properties / sheetBackground / title
      Added value: +"Sheet background colour"
    • addedInput schema / properties / sheetBackground / x-show-when
      Added value: +{
      +  "mode": [
      +    "sheet",
      +    "filmstrip"
      +  ]
      +}
    • changedInput schema / properties / sheetColumns / description
      Previous value: -"mode=sheet only — filmstrip is always one row. Out-of-range clamps silently to 1-10."New value: +"How many pages sit side by side on the contact sheet."
    • addedInput schema / properties / sheetColumns / x-show-when
      Added value: +{
      +  "mode": [
      +    "sheet"
      +  ]
      +}
    • changedInput schema / properties / sheetGap / description
      Previous value: -"Pixel spacing between tiles in sheet/filmstrip modes. Out-of-range clamps silently to 0-200."New value: +"Spacing between the tiles, in pixels."
    • addedInput schema / properties / sheetGap / x-show-when
      Added value: +{
      +  "mode": [
      +    "sheet",
      +    "filmstrip"
      +  ]
      +}
    • changedInput schema / properties / tiffCompression / description
      Previous value: -"TIFF compression (format=tiff only)."New value: +"How the TIFF is packed down."
    • addedInput schema / properties / tiffCompression / x-show-when
      Added value: +{
      +  "format": [
      +    "tiff"
      +  ]
      +}
    • addedInput schema / properties / tiffCompression / x-ui
      Added value: +{
      +  "labels": {
      +    "g4": "Group 4 (black and white)",
      +    "jpeg": "JPEG (smaller, lossy)",
      +    "lzw": "LZW (lossless, default)",
      +    "none": "None (largest)",
      +    "packbits": "PackBits (lossless)",
      +    "zip": "ZIP (lossless)"
      +  }
      +}
    • changedInput schema / properties / transparent / description
      Previous value: -"PNG alpha channel when true"New value: +"Leave the paper see-through instead of white."
    • addedInput schema / properties / transparent / x-show-when
      Added value: +{
      +  "colorMode": [
      +    "rgb"
      +  ],
      +  "format": [
      +    "png",
      +    "webp",
      +    "avif"
      +  ]
      +}
    • changedInput schema / properties / watermarkPosition / description
      Previous value: -"Unknown codes silently become c (center). Does nothing unless watermarkText is set."New value: +"Where the stamp sits on each image."
    • addedInput schema / properties / watermarkPosition / x-ui
      Added value: +{
      +  "labels": {
      +    "bc": "Bottom centre",
      +    "bl": "Bottom left",
      +    "br": "Bottom right",
      +    "c": "Centre",
      +    "ml": "Middle left",
      +    "mr": "Middle right",
      +    "tc": "Top centre",
      +    "tl": "Top left",
      +    "tr": "Top right"
      +  }
      +}
    • changedInput schema / properties / watermarkScale / description
      Previous value: -"ACCEPTED BUT UNUSED in this tool — the raster stamp sizes by watermarkFontSize only; set that instead."New value: +"Not used by this tool — size the stamp with Watermark font size."
    • addedInput schema / properties / watermarkScale / x-show-when
      Added value: +{
      +  "mode": [
      +    "__never"
      +  ]
      +}
    • changedInput schema / properties / watermarkTile / description
      Previous value: -"ACCEPTED BUT UNUSED in this tool — no tiling on rasterized pages; the stamp renders once at watermarkPosition."New value: +"Not used by this tool - a rasterised page is stamped once, where Watermark position says."
    • addedInput schema / properties / watermarkTile / x-show-when
      Added value: +{
      +  "mode": [
      +    "__never"
      +  ]
      +}
    • changedInput schema / properties / webpQuality / description
      Previous value: -"Consulted only when format=webp. Out-of-range clamps silently to 50-95 — this is not a 0-100 scale."New value: +"Higher keeps more detail and makes a bigger file."
    • addedInput schema / properties / webpQuality / x-show-when
      Added value: +{
      +  "format": [
      +    "webp"
      +  ]
      +}
  8. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The description mentions tier restrictions (Starter+ for AVIF and filmstrip) but does not disclose side effects, authentication requirements for urls mode, or any other behavioral traits beyond what annotations (readOnlyHint=false, destructiveHint=false) already indicate. Since annotations are minimal, the description carries more burden, but it only hints at tier limitations and stays silent on error handling or response details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single long sentence that front-loads the core purpose but then becomes a sprawling list of features. It is informative but not concise; the run-on structure makes it harder to parse quickly. It would benefit from shorter sentences or bullet points.

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 tool with 30 parameters and no output schema, the description covers the major functional areas: formats, page ranges, color modes, transparency, cropping, watermarking, contact sheets, presets, and response modes. It is missing details like return format specifics, but given the complexity and schema richness, it is reasonably complete.

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%, and the description does not add meaning to any parameter beyond what the schema already provides. It lists capabilities (e.g., DPI controls, crop) but does not elaborate on parameter syntax or relationships. Baseline 3 is appropriate because 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?

The description explicitly states the verb (rasterize), the resource (PDF pages), and the output formats (PNG/JPG/WEBP/TIFF/AVIF). It enumerates many specific features, making the tool's purpose unambiguous and distinguishing it from sibling tools like pdf_to_text or pdf_compress. While it doesn't directly name the batch sibling, the feature set clearly targets single-file conversion with advanced options.

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?

The description provides no guidance on when to use this tool versus alternatives such as pdf_to_images_batch. It lists features but never mentions exclusions, prerequisites, or a decision tree. An agent cannot tell from the description whether to prefer this over the batch variant or other PDF conversion tools.

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