Skip to main content
Glama

Images to PDF API - JPG, PNG, HEIC to one PDF

images_to_pdf
Read-onlyIdempotent

Put 1-60 images (JPG, PNG, WebP, HEIC, GIF, TIFF) into one PDF, one image per page, original size or centered on A4. EXIF rotation applied. Runs on our server, files are deleted right after the call, nothing stored. Free: 25 calls/day per IP. Paid: $0.005 per call via x402 at https://radarbg.com/x402/images-to-pdf.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "size": "a4",
      "fileName": "sample.png",
      "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
    },
    "name": "images_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNofit (page = image size) or a4fit
filesNoOr several files: [{fileName, fileContent (base64)}]
fileNameNoFile name with extension, e.g. report.pdf
fileContentNoThe file as base64 (a data: URI is fine)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld, but the description adds genuinely new behavioral facts: EXIF rotation is applied, processing happens server-side, input files are deleted immediately and nothing is stored, and there are concrete cost/rate limits (25 free calls per day per IP, $0.005 per call via x402 with the endpoint URL). The pricing and data-retention disclosures are exactly the kind of context annotations cannot convey.

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, front-loaded sentences: capability and limits first, then behavior (EXIF, ephemeral storage), then cost model. Every clause carries information an agent would otherwise have to guess, and there is no filler or repetition of the title.

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 stateless conversion tool with no output schema, the description covers inputs, limits, processing behavior, privacy, and pricing thoroughly. The one remaining gap is the return shape: it never says whether the agent receives base64 PDF bytes, a URL, or a file handle, and the x402 payment flow is referenced only by URL rather than described.

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 description coverage is 100%, so the schema already carries parameter meaning and the baseline is 3. The description still adds value by constraining the files array to 1-60 image items and by explaining that 'fit' means original image size versus 'a4' meaning centered on an A4 page, which clarifies the intent behind the enum beyond the terse schema text 'fit (page = image size) or a4.'

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 opens with a specific verb and resource: 'Put 1-60 images (JPG, PNG, WebP, HEIC, GIF, TIFF) into one PDF, one image per page.' The conversion direction plus the stated output layout distinguishes it unambiguously from the inverse sibling pdf_to_image and from image_compress/image_convert, which do not produce a PDF.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied through hard scope constraints (1-60 images, the accepted format list, fit vs a4 layout) rather than stated as when-to-use guidance. No sibling is named as an alternative and no exclusion conditions are given, so the agent must infer that this is the tool for image-to-PDF and not, say, image_convert.

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