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
    • 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."
  2. 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."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already signal a non-read-only, potentially destructive operation, so the bar for behavioral disclosure is lower. The description adds useful context about return values (asset ID, URL, format in item) and the performance tradeoff of include_image_data. It does not detail all side effects, but it goes beyond a bare 'creates an image' statement.

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 sentences with no filler. The core action and alternative selection are front-loaded, followed by targeted usage notes.

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 creation tool with a rich nested schema, the description tells the agent what to use it for, how to differentiate it from siblings, how to crop, and what the response contains. Nothing essential for invoking it correctly is missing.

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%, so the schema carries the full parameter documentation burden. The description adds no fundamentally new parameter semantics beyond highlighting content.selector for cropping and include_image_data's conditional use, which is helpful but not 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?

The description opens with a specific verb and resource: 'Creates an image from supplied HTML and CSS.' It also differentiates from siblings by naming create_url_image and create_template, so an agent can distinguish the tools without inspecting schemas.

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?

It gives explicit selection criteria: use this tool for a single graphic, card, or document; use create_url_image for existing web pages; and use create_template for reusable designs. It also flags include_image_data as only for inline-preview needs, providing clear when-to-use guidance.

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