Skip to main content
Glama

HTML/CSS to Image API

Create a batch of images

create_batch_images
Destructive

Creates multiple image assets from shared default_options and individual variations. Keep the number of variations within max_batch_size from capabilities, or call get_max_batch_size if that limit is not already known; a limit of 0 requires individual image calls. Each variation overrides corresponding defaults. Returns per-image asset IDs, URLs, and format information in item. Use the individual creation tools when only one image or an inline preview is needed.

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": {
      "variations": "<variations>"
    },
    "name": "create_batch_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
variationsYesIndividual image variations, any parameter supplied will override the corresponding option in default_options.
default_optionsNoOptional common parameters that will apply to all images in the batch.

Output Schema

NameRequiredDescriptionDefault
itemNoOperation result. Check success before using this value.
errorNoError details when the operation failed; null on success.
successNoWhether the operation succeeded. If false, inspect error before retrying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • changedInput schema / properties / default_options / properties / css / description
      Previous value: -"Optional CSS for either image source. With `html`, it styles the supplied markup; with `url`, it is injected after the page loads to override page styles."New value: +"Optional CSS for either source. With `html`, it styles the supplied markup; with `url`, it is injected after the page loads to override page styles."
    • changedInput schema / properties / default_options / properties / dedupe_duration_s / description
      Previous value: -"Reuse an existing image with identical content if it was created within this many seconds. Set `0` to disable deduplication. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan."New value: +"Reuse an existing capture with identical content if it was created within this many seconds. Set `0` to disable deduplication. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan."
    • changedInput schema / properties / default_options / properties / device_scale / description
      Previous value: -"Screenshot pixel ratio from `0.1` to `3`. Higher values increase output dimensions, file size, and render time. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1."New value: +"Capture pixel ratio from `0.1` to `3`. Higher values increase output dimensions, file size, and render time. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1."
    • changedInput schema / properties / default_options / properties / disable_twemoji / description
      Previous value: -"HTML/CSS images use Twemoji by default; set `disable_twemoji: true` to disable it. URL images inject Twemoji only with explicit `disable_twemoji: false`; omitted, null, or true leaves the page's emoji handling unchanged."New value: +"HTML/CSS captures use Twemoji by default; set `disable_twemoji: true` to disable it. URL captures inject Twemoji only with explicit `disable_twemoji: false`; omitted, null, or true leaves the page's emoji handling unchanged."
    • changedInput schema / properties / default_options / properties / identify_as_hcti / description
      Previous value: -"Send `X-HCTI-SCREENSHOT: 1` with the top-level `url` navigation so the target site can identify screenshot requests."New value: +"Send `X-HCTI-SCREENSHOT: 1` with the top-level `url` navigation so the target site can identify capture requests."
    • changedInput schema / properties / default_options / properties / metadata / description
      Previous value: -"Custom key-value metadata stored with the image."New value: +"Custom key-value metadata stored with the capture."
    • changedInput schema / properties / default_options / properties / viewport_height / description
      Previous value: -"Viewport height in pixels. Set it together with `viewport_width` only when an exact browser viewport is needed; doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."New value: +"Viewport height in pixels. Set it together with `viewport_width` only when an exact browser viewport is needed; for screenshots, doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."
    • changedInput schema / properties / default_options / properties / viewport_width / description
      Previous value: -"Viewport width in pixels. Set it together with `viewport_height` only when an exact browser viewport is needed; doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."New value: +"Viewport width in pixels. Set it together with `viewport_height` only when an exact browser viewport is needed; for screenshots, doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."
    • changedInput schema / properties / variations / items / properties / css / description
      Previous value: -"Optional CSS for either image source. With `html`, it styles the supplied markup; with `url`, it is injected after the page loads to override page styles."New value: +"Optional CSS for either source. With `html`, it styles the supplied markup; with `url`, it is injected after the page loads to override page styles."
    • changedInput schema / properties / variations / items / properties / dedupe_duration_s / description
      Previous value: -"Reuse an existing image with identical content if it was created within this many seconds. Set `0` to disable deduplication. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan."New value: +"Reuse an existing capture with identical content if it was created within this many seconds. Set `0` to disable deduplication. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan."
    • changedInput schema / properties / variations / items / properties / device_scale / description
      Previous value: -"Screenshot pixel ratio from `0.1` to `3`. Higher values increase output dimensions, file size, and render time. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1."New value: +"Capture pixel ratio from `0.1` to `3`. Higher values increase output dimensions, file size, and render time. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1."
    • changedInput schema / properties / variations / items / properties / disable_twemoji / description
      Previous value: -"HTML/CSS images use Twemoji by default; set `disable_twemoji: true` to disable it. URL images inject Twemoji only with explicit `disable_twemoji: false`; omitted, null, or true leaves the page's emoji handling unchanged."New value: +"HTML/CSS captures use Twemoji by default; set `disable_twemoji: true` to disable it. URL captures inject Twemoji only with explicit `disable_twemoji: false`; omitted, null, or true leaves the page's emoji handling unchanged."
    • changedInput schema / properties / variations / items / properties / identify_as_hcti / description
      Previous value: -"Send `X-HCTI-SCREENSHOT: 1` with the top-level `url` navigation so the target site can identify screenshot requests."New value: +"Send `X-HCTI-SCREENSHOT: 1` with the top-level `url` navigation so the target site can identify capture requests."
    • changedInput schema / properties / variations / items / properties / metadata / description
      Previous value: -"Custom key-value metadata stored with the image."New value: +"Custom key-value metadata stored with the capture."
    • changedInput schema / properties / variations / items / properties / viewport_height / description
      Previous value: -"Viewport height in pixels. Set it together with `viewport_width` only when an exact browser viewport is needed; doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."New value: +"Viewport height in pixels. Set it together with `viewport_width` only when an exact browser viewport is needed; for screenshots, doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."
    • changedInput schema / properties / variations / items / properties / viewport_width / description
      Previous value: -"Viewport width in pixels. Set it together with `viewport_height` only when an exact browser viewport is needed; doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."New value: +"Viewport width in pixels. Set it together with `viewport_height` only when an exact browser viewport is needed; for screenshots, doing so disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together."
  2. Changed3 schema fields changed
    • addedInput schema / properties / default_options / default
      Added value: +null
    • changedInput schema / properties / default_options / description
      Previous value: -"Common parameters that will apply to all images in the batch."New value: +"Optional common parameters that will apply to all images in the batch."
    • changedInput schema / required
      Previous value: -[
      -  "default_options",
      -  "variations"
      -]New value: +[
      +  "variations"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / properties / default_options / properties / request_overrides
      Added value: +{
      +  "description": "An array of request rules. Use `action: \"block\"` with a `url` wildcard pattern (using `*`) and/or `resource_types` as an array of resource names, such as `image`, `script`, or `xhr`. Both matchers must match when supplied together; any matching block rule blocks the request. Omitted, `null`, or `[]` adds no overrides. Requires a paid plan. Accepts a JSON array in JSON requests or a JSON-encoded array string in form requests. Maximum 100 rules and 512 characters per URL pattern. Each block rule requires a nonempty URL pattern or at least one resource type; supplied matchers cannot be empty. Not supported in query strings.",
      +  "items": {
      +    "anyOf": [
      +      {
      +        "properties": {
      +          "action": {
      +            "const": "block"
      +          },
      +          "resource_types": {
      +            "description": "Resource types to match, supplied as an array of names, such as image, script, xhr, or fetch. Any listed type may match. When url is also supplied, it must match too.",
      +            "items": {
      +              "enum": [
      +                "beacon",
      +                "document",
      +                "stylesheet",
      +                "image",
      +                "image_set",
      +                "media",
      +                "font",
      +                "script",
      +                "text_track",
      +                "xhr",
      +                "fetch",
      +                "event_source",
      +                "manifest",
      +                "ping",
      +                "img",
      +                "other"
      +              ],
      +              "type": "string"
      +            },
      +            "type": [
      +              "array",
      +              "null"
      +            ]
      +          },
      +          "url": {
      +            "description": "URL wildcard pattern to match, using * for any sequence of characters. When resource_types is also supplied, both matchers must match.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        }
      +      }
      +    ],
      +    "description": "A browser request override. The action discriminator selects the rule type; currently only block is supported.",
      +    "required": [
      +      "action"
      +    ],
      +    "type": [
      +      "object",
      +      "null"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / variations / items / properties / request_overrides
      Added value: +{
      +  "description": "An array of request rules. Use `action: \"block\"` with a `url` wildcard pattern (using `*`) and/or `resource_types` as an array of resource names, such as `image`, `script`, or `xhr`. Both matchers must match when supplied together; any matching block rule blocks the request. Omitted, `null`, or `[]` adds no overrides. Requires a paid plan. Accepts a JSON array in JSON requests or a JSON-encoded array string in form requests. Maximum 100 rules and 512 characters per URL pattern. Each block rule requires a nonempty URL pattern or at least one resource type; supplied matchers cannot be empty. Not supported in query strings.",
      +  "items": {
      +    "anyOf": [
      +      {
      +        "properties": {
      +          "action": {
      +            "const": "block"
      +          },
      +          "resource_types": {
      +            "description": "Resource types to match, supplied as an array of names, such as image, script, xhr, or fetch. Any listed type may match. When url is also supplied, it must match too.",
      +            "items": {
      +              "enum": [
      +                "beacon",
      +                "document",
      +                "stylesheet",
      +                "image",
      +                "image_set",
      +                "media",
      +                "font",
      +                "script",
      +                "text_track",
      +                "xhr",
      +                "fetch",
      +                "event_source",
      +                "manifest",
      +                "ping",
      +                "img",
      +                "other"
      +              ],
      +              "type": "string"
      +            },
      +            "type": [
      +              "array",
      +              "null"
      +            ]
      +          },
      +          "url": {
      +            "description": "URL wildcard pattern to match, using * for any sequence of characters. When resource_types is also supplied, both matchers must match.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        }
      +      }
      +    ],
      +    "description": "A browser request override. The action discriminator selects the rule type; currently only block is supported.",
      +    "required": [
      +      "action"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / default_options / properties / disable_twemoji / description
      Previous value: -"Use native Linux emoji rendering instead of HCTI's consistent Twemoji images. Leave `disable_twemoji` unset unless native emoji rendering is specifically needed."New value: +"HTML/CSS images use Twemoji by default; set `disable_twemoji: true` to disable it. URL images inject Twemoji only with explicit `disable_twemoji: false`; omitted, null, or true leaves the page's emoji handling unchanged."
    • changedInput schema / properties / variations / items / properties / disable_twemoji / description
      Previous value: -"Use native Linux emoji rendering instead of HCTI's consistent Twemoji images. Leave `disable_twemoji` unset unless native emoji rendering is specifically needed."New value: +"HTML/CSS images use Twemoji by default; set `disable_twemoji: true` to disable it. URL images inject Twemoji only with explicit `disable_twemoji: false`; omitted, null, or true leaves the page's emoji handling unchanged."
  5. Changed3 schema fields changed
    • addedOutput schema / properties / error / description
      Added value: +"Error details when the operation failed; null on success."
    • addedOutput schema / properties / item / description
      Added value: +"Operation result. Check success before using this value."
    • addedOutput schema / properties / success / description
      Added value: +"Whether the operation succeeded. If false, inspect error before retrying."
  6. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and non-idempotent, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the merge precedence of variation over default, the batch-size gate, and the per-item result contents. It does not explain the cost/quota implications of creating many assets in one call, which is the main remaining gap for a destructive batch operation.

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 action, then constraints, then the return shape, then the alternative. Five sentences with little waste, though the merge-override sentence duplicates schema wording and the return-value sentence overlaps the output schema.

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?

Covers the essentials for a batch mutation tool: how defaults and variations compose, the batch size ceiling and how to resolve it, and how to avoid the tool entirely for single images. An output schema exists, so the brief return-value mention is a bonus rather than a requirement; what is missing is any note on partial failures when some batch items fail.

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 description coverage is 100% and only two top-level parameters exist, so the schema already documents both, including the override semantics for variations and default_options. The description's sentence 'Each variation overrides corresponding defaults' restates what the schema already says rather than adding new 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 ('Creates multiple image assets') and immediately pins down the batch model of shared default_options plus individual variations. It is clearly distinguishable from the single-image siblings named later in the description.

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

Usage Guidelines5/5

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

Gives concrete routing rules: check max_batch_size from capabilities or call get_max_batch_size, fall back to individual calls when the limit is 0, and use the individual creation tools when only one image or an inline preview is needed. When-to-use, when-not, and the alternative tool are all explicit.

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.