Skip to main content
Glama

image_to_pdf

Convert JPG, PNG or WebP images into a PDF file for submission or printing. Upload an image and write the resulting PDF to a chosen path.

Instructions

Wrap a JPG, PNG or WebP image in a PDF page. Use this when an image needs to be submitted or printed as a PDF. 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": "image_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesAbsolute path to the image.
output_pathNoAbsolute path to write the result to. Defaults to the input file with a "-papyrio.pdf" 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: it discloses data handling (uploaded to the API, processed in memory, not stored), destructive overwrite of output_path, the 50 MB input limit, and per-call quota consumption. It also states exactly what the call returns.

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 short sentences, front-loaded with purpose then usage, then behavior and limits. No sentence is redundant; each conveys a distinct operationally useful fact.

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 a two-parameter conversion tool with no annotations and no output schema, the description covers everything an agent needs: input formats, size cap, storage behavior, overwrite risk, return value, and quota impact.

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 both parameters are already documented. The description still adds real semantics beyond the schema by stating that output_path is overwritten if a file already exists, which the schema does not say.

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 ('wrap a JPG, PNG or WebP image in a PDF page') and names the accepted input formats. It is clearly distinguishable from sibling conversions like office_to_pdf, webpage_to_pdf, and the reverse pdf_to_jpg.

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 clear usage condition: 'Use this when an image needs to be submitted or printed as a PDF.' It does not explicitly exclude alternatives (e.g. when to prefer office_to_pdf for a document), but the image-format scoping makes the selection obvious in practice.

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