Skip to main content
Glama

Build a PDF from images

images_to_pdf
Read-onlyIdempotent

Turn images, sent as base64 or public URLs in order, into one PDF. JPEG and PNG are embedded directly. Other formats are converted to PNG first. Page size is A4, Letter, or fit. Private addresses are refused. Returns the PDF as base64.

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": {
      "images": "<images>"
    },
    "name": "images_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoa4
imagesYes
marginNo
orientationNoauto

Output Schema

NameRequiredDescriptionDefault
dataYesPDF bytes as base64.
bytesYes
pageCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint, idempotentHint, openWorldHint), and the description adds genuine context beyond them: JPEG/PNG are embedded without re-encoding, other formats are converted to PNG, ordering of the images array is preserved, private addresses are refused, and the result is returned as base64. It does not discuss size limits or failure behavior, but for a read-only transform this is solid disclosure.

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?

Six short sentences, front-loaded with the core verb and resource, followed by format handling, page options, security policy, and return type. Every sentence adds information an agent would otherwise have to guess, and nothing is repeated from the annotations.

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?

With an output schema present, the description need not detail the response beyond noting base64 PDF. It covers input forms, format conversion, page sizing, and the SSRF-style address refusal, which is the operationally critical context. The only gaps are margin and orientation, which the schema's defaults and ranges partially cover.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Top-level parameters (page, margin, orientation) have no schema descriptions (schema description coverage reported as 0%), so the description must compensate. It does explain the page enum meaningfully, including the non-obvious 'fit' value, and clarifies the images array semantics (base64 vs URL, order), but it says nothing about margin or orientation, leaving two of four parameters to the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Turn images ... into one PDF', and names the two accepted input forms (base64, public URLs). It clearly distinguishes this assembly tool from the PDF-manipulation siblings (merge_pdf, compress_pdf) by identifying images as the source material, though it does not explicitly name an alternative.

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 by the input description ('images, sent as base64 or public URLs in order') and the format note, so an agent can infer this is the tool for combining images into a PDF. However, there is no explicit when-to-use/when-not-to-use guidance and no routing to a sibling such as merge_pdf for combining existing PDFs.

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.