Skip to main content
Glama

img_to_pdf

Converts JPG, PNG, or WebP images into a PDF document by specifying image paths and an output PDF file.

Instructions

Converts image(s) to a PDF document. [Input: JPG/PNG/WebP images | Output: PDF (.pdf)]

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": {
      "inputs": "<inputs>",
      "output": "<output>"
    },
    "name": "img_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYesList of image paths.
outputYesThe output PDF file path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden, and it does disclose the accepted input formats and the output artifact type. It is silent on important traits: whether multiple inputs are merged in array order into multiple pages, whether an existing output file is overwritten, and what scaling or DPI handling occurs.

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 compact clauses, no filler, with the conversion action stated first and the input/output contract front-loaded in brackets. Every element earns its place.

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 two-parameter, fully documented schema with no output schema, the definition is nearly sufficient: format support and output type are clear. It falls just short on multi-image behavior (page order, merging) and overwrite semantics, which matter for a file-writing tool with no annotations.

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?

Schema coverage is 100%, so both parameters are already documented, giving a baseline of 3. The description adds modest value by clarifying that inputs are raster image files in JPG/PNG/WebP and that 'image(s)' means the array can hold several, but it does not explain ordering or path semantics beyond the 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 names a specific verb and resource pair: convert images into a PDF document, and brackets the accepted input formats (JPG/PNG/WebP) against the PDF output. It does not, however, distinguish itself from adjacent siblings such as pdf_images_to_pdf or html_to_pdf, so an agent must infer which converter applies.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of a sibling alternative, and no prerequisites. The input-format notation implicitly narrows the case to raster images, but nothing tells the agent what to choose when images are already inside a PDF.

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