Skip to main content
Glama

PDF Efforts

Images to PDF

images_to_pdf
Idempotent

Combine 1 to 20 images (JPG, PNG, WEBP, GIF, BMP) into one PDF, one image per page, in the order given. JPG and PNG are embedded at full resolution.

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

Input Schema

NameRequiredDescriptionDefault
filesYesThe images, in page order.
marginNonone
page_sizeNo"fit" = each page is the size of its image.fit
orientationNoauto

Output Schema

NameRequiredDescriptionDefault
infoNoFacts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf).
noteNoAnything the user should know about the result.
textNoExtracted text (pdf_to_text, ocr_pdf).
filesYesResult files. Download them before expires_at; pass file_id to another tool to chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true, openWorldHint=true), so the description's job is to add operational detail. It does: hard limit of 20 images, one image per page, preserved ordering, and the notable fact that JPG/PNG are embedded at full resolution (implying other formats are not). It omits what happens to oversized images and how the output file is named.

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?

Two tightly written sentences with the operation, limits, and ordering front-loaded and zero filler. Nothing can be removed without losing information.

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?

An output schema exists, so return values need not be explained, and the input object's file-source rules are documented in the schema itself. What remains unaddressed is how non-JPG/PNG formats are handled and how margin interacts with the 'fit' page size, both of which an agent might reasonably need.

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?

With 50% schema description coverage, the description adds real value by enumerating accepted formats, which the schema's file object does not state. But it says nothing about margin or orientation, and page_size is covered in the schema rather than the description, so two of the four parameters get no additional meaning.

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 images into one PDF), plus the supported formats, the 1-20 bound, page-per-image layout, and order preservation. That is enough for an agent to distinguish it from the reverse-direction sibling pdf_to_images or from merge_pdfs without opening any 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 is implied by the operation itself (input is images, output is a PDF), and the 1-20 image bound tells the agent when the tool is applicable. However, there is no explicit routing guidance: nothing says to prefer office_to_pdf for documents, or merge_pdfs when the inputs are already PDFs, and no caveats about failure modes.

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