Skip to main content
Glama

Turn PDF pages into pictures

pdf_to_image

Draws pages of a PDF as PNG or JPEG pictures and returns the render with download_url: one page gives the picture, which this tool also hands back so you can look at it (up to 2 MB), several pages a ZIP of pictures named by page. At most 100 pages and 120 million pixels a call, about 13 A4 pages at 300 dpi. Use it to see a page before redact_pdf, or for thumbnails. Pass exactly one PDF: source, a render or library file of the workspace, or file_base64, the PDF itself. Starter plan and above; one unit per picture on a live key.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pdf_to_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoResolution, 36 to 300, 150 when left out; at 72 a pixel stands for a point
pagesNoThe pages to draw, such as 1, 1-3,5 or 2- (page 2 to the last); every page when left out
formatNopng (the default) or jpg
sourceNoA PDF of the workspace: the rnd_ id of a PDF render, or a PDF of the file library by name (such as terms.pdf) or fil_ id
qualityNoJPEG quality, 1 to 100; ignored for PNG
filenameNoName of the file behind download_url; the source's name when left out
file_nameNoName of the PDF given as file_base64 or path, e.g. contract.pdf; the results are named after it
file_base64NoThe PDF itself, base64 encoded, up to 20 MB; sent with the request and not kept

Output Schema

NameRequiredDescriptionDefault
idYesrnd_ id of the render
formNoWhat fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran
pdfaNoThe PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it
errorYesWhy a failed render failed
unitsYesUnits the render counted
outputNoThe format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image
statusYes
einvoiceNoThe e-invoice report, when the render made one
templateYesThe template and version rendered; null for html and conversions
expires_atYesWhen download_url stops working; get_render issues a fresh one
page_countYes
environmentYes
download_urlYesSigned link to the file; null until the render succeeded
accessibilityNoThe PDF/UA-1 verdict, when the template declares it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations, which only declare generic non-destructive/non-idempotent traits: it discloses the two output shapes (inline picture up to 2 MB vs ZIP named by page), hard limits (100 pages, 120 million pixels, ~13 A4 pages at 300 dpi), that base64 content is not retained, and the commercial gating (Starter plan and above, one unit per picture on a live key). Those are exactly the cost and capacity facts an agent needs before calling. Nothing here conflicts with readOnlyHint=false, since the call consumes render units.

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-loads the operation and result shape, then limits, then input rules, then pricing — a sensible order with no filler. The clause "which this tool also hands back so you can look at it" is slightly convoluted and could be trimmed, keeping it just below top marks.

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?

For an 8-parameter render tool with an output schema, everything material is covered: what is produced, page/format semantics, capacity and pixel ceilings, input exclusivity, and plan/credit requirements. No open questions remain that would cause a wrong invocation.

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 already 100%, so the per-parameter definitions carry the detail and a baseline of 3 applies. The description earns an extra point by stating the exclusive-input constraint ("Pass exactly one PDF: source ... or file_base64"), a mutual-exclusion rule the schema itself does not encode since no parameters are required.

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 ("Draws pages of a PDF as PNG or JPEG pictures") plus the scoping behavior: one page returns an inline image, several return a ZIP of page-named files. The rasterization focus makes it distinguishable from siblings like render or convert_to_pdf 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 Guidelines4/5

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

Gives a concrete use case tied to a named sibling ("see a page before redact_pdf") plus a secondary one ("or for thumbnails"), and adds a selection rule for inputs ("Pass exactly one PDF"). It stops short of stating when not to use it versus render or convert_to_pdf, so it is clear but not exhaustive.

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