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: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.005/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. Added

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing server-side processing, immediate file deletion with no storage, EXIF rotation handling, a 1-60 image cap, and per-IP rate limits. Auth and cost mechanics (X-API-Key vs x402 per-call payment) are also spelled out, which the schema and annotations do not cover. Missing only return-format/pagination detail, which matters less without an output schema.

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-loaded with the core verb and constraints, then the operational facts. The pricing URLs and tier details are dense but actionable; a slight trimming of the pricing sentence would lose nothing essential.

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 stateless conversion endpoint with no output schema, the description covers inputs, limits, layout options, privacy behavior, rate limits, and auth. An agent has everything needed to decide to call it and to construct the request.

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 the baseline is 3, but the description adds real meaning the schema lacks: which image formats are accepted, the 1-60 count bound, and a plain-language rendering of the size enum (original image size vs centered on 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?

States a specific verb and resource (combine 1-60 images into one PDF), enumerates accepted input formats, and specifies the output layout (one image per page). An agent can tell this apart from pdf_to_image or image_to_base64 without opening the schema.

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 context is implied strongly by the conversion direction and the accepted input formats, and the pricing/auth note tells the caller what is needed to run it. However, it never names an alternative or states when not to use it (e.g. single-image conversion or PDF-to-image tasks handled by siblings).

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