Skip to main content
Glama

HTML/CSS to Image API

Create an Image

create_image
Destructive

Creates an image from supplied HTML and CSS. Use this for a single graphic, card, or document; use create_url_image to capture an existing web page, or create_template to save a reusable design. Set content.selector to crop to a specific element. Returns asset ID, URL, and format information in item. Set include_image_data only when an inline preview is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesSelf-contained image content and render options. For fixed-size artwork, use selector and give the selected element explicit dimensions.
include_image_dataNoEagerly render and include up to 4 MiB of image data for an inline preview. This takes longer and reports progress when the client supports progress notifications. Successful stored renders also return a URL that can be opened or embedded outside the MCP context. Use only when the user requests or needs an inline preview.

Output Schema

TableJSON 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. Changed1 schema field changed
    • addedInput schema / properties / content / 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"
      +  ]
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / content / 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: +"Twemoji is enabled by default. Set `disable_twemoji: true` to disable automatic emoji replacement and use the supplied fonts or native emoji fonts instead. Omitted, `null`, or `false` keeps Twemoji enabled."
  3. 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."
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, openWorldHint=true, and idempotentHint=false, so the safety profile is covered structurally. The description adds value by disclosing the return payload (asset ID, URL, format info in item) and the cost/latency tradeoff of include_image_data, though it says nothing about auth, rate limits, or plan restrictions that surface in the schema.

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?

Four tight sentences, front-loaded with the core verb and resource, followed by sibling routing and two parameter hints in descending order of importance. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a create operation with a rich nested schema, full annotations, and an output schema that documents return values, the description covers everything an agent needs: what it does, which sibling to choose instead, and the two non-obvious parameter behaviors.

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 the nested content object is exhaustively documented, so the schema carries the burden and baseline 3 applies. The description's parameter notes (selector cropping, include_image_data for previews) largely restate what the schema already says rather than adding new semantics.

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 an image from supplied HTML and CSS') and immediately differentiates itself from the two nearest siblings, create_url_image and create_template, by naming the condition that selects each. An agent can pick the right tool without opening a schema.

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?

Explicit routing guidance: this tool for a single graphic/card/document, create_url_image for capturing an existing page, create_template for a reusable design. It also gives conditional advice for optional behavior (selector for cropping, include_image_data only when an inline preview is needed).

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.