WebMCP Registry

jpg_to_pdf

verifiedv0.1

Builds one PDF from 1 to 8 JPEG or PNG images in the browser. Pass images as machine documents (mime image/jpeg or image/png, base64, no data URL prefix, 12 MiB decoded each) plus optional pageMode, orientation, and flavor. WebP and HEIC are rejected — convert first with image_convert. Variant URLs are not a second machine Tool — pass pageMode explicitly. Do not use this to merge PDFs (that is pdf_merge).

Updated 9/3/2026 · Created 9/3/2026

Input Schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "images"
  ],
  "properties": {
    "flavor": {
      "enum": [
        "generic",
        "png"
      ],
      "type": "string",
      "default": "generic"
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "mime",
          "base64"
        ],
        "properties": {
          "mime": {
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/avif",
              "image/heic",
              "image/heif",
              "image/jxl"
            ],
            "type": "string"
          },
          "base64": {
            "type": "string",
            "maxLength": 16777220,
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "maxItems": 8,
      "minItems": 1
    },
    "pageMode": {
      "enum": [
        "fit-image",
        "a4"
      ],
      "type": "string",
      "default": "fit-image"
    },
    "orientation": {
      "enum": [
        "portrait",
        "landscape"
      ],
      "type": "string",
      "default": "portrait"
    }
  },
  "additionalProperties": false
}

Full Contract

{
  "name": "jpg_to_pdf",
  "description": "Builds one PDF from 1 to 8 JPEG or PNG images in the browser. Pass images as machine documents (mime image/jpeg or image/png, base64, no data URL prefix, 12 MiB decoded each) plus optional pageMode, orientation, and flavor. WebP and HEIC are rejected — convert first with image_convert. Variant URLs are not a second machine Tool — pass pageMode explicitly. Do not use this to merge PDFs (that is pdf_merge).",
  "inputSchema": {
    "type": "object",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "required": [
      "images"
    ],
    "properties": {
      "flavor": {
        "enum": [
          "generic",
          "png"
        ],
        "type": "string",
        "default": "generic"
      },
      "images": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "mime",
            "base64"
          ],
          "properties": {
            "mime": {
              "enum": [
                "image/jpeg",
                "image/png",
                "image/webp",
                "image/avif",
                "image/heic",
                "image/heif",
                "image/jxl"
              ],
              "type": "string"
            },
            "base64": {
              "type": "string",
              "maxLength": 16777220,
              "minLength": 1
            }
          },
          "additionalProperties": false
        },
        "maxItems": 8,
        "minItems": 1
      },
      "pageMode": {
        "enum": [
          "fit-image",
          "a4"
        ],
        "type": "string",
        "default": "fit-image"
      },
      "orientation": {
        "enum": [
          "portrait",
          "landscape"
        ],
        "type": "string",
        "default": "portrait"
      }
    },
    "additionalProperties": false
  }
}

GET /api/tool/simpletoolstack.com/jpg_to_pdf