Skip to main content
Glama

pdf_to_jpg

Convert every PDF page into a JPG image and receive them as a ZIP archive, useful for thumbnails, slides, or image pipelines.

Instructions

Render every page of a PDF as a JPG image, returned as a ZIP archive. Use this when the pages are needed as pictures, for a thumbnail, a slide or an image pipeline. The input is uploaded to the Papyrio API, processed in memory and not stored. The result is written to output_path, replacing any file already there, and the call returns that path and the size in bytes. Inputs are limited to 50 MB, and each call counts as one operation against the daily quota.

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": {
      "file": "<file>"
    },
    "name": "pdf_to_jpg"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesAbsolute path to the PDF.
output_pathNoAbsolute path to write the result to. Defaults to the input file with a "-papyrio.zip" suffix.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: 50 MB input cap, per-call quota cost, in-memory processing with no storage, and destructive overwrite of output_path. These are exactly the operational facts an agent needs before invoking.

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: what it does first, then when to use it, then storage/safety behavior, then limits and return value. 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?

No output schema, but the description states the return shape (path and byte size), plus limits, overwrite semantics, and processing model — everything needed to call it 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 baseline would be 3. The description adds value beyond the schema by disclosing that output_path is overwritten if it exists and by describing the return payload (path plus size in bytes), which the schema lacks.

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: render every page of a PDF as JPG, returned as a ZIP. The output format detail (ZIP of JPGs) clearly separates it from extract_pdf_text, ocr_pdf, and pdf_to_word.

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 explicit use cases — thumbnail, slide, image pipeline — which implies when to pick this over text-extraction siblings. It does not name an alternative tool or state exclusions, 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.