Skip to main content
Glama

HTML/CSS to Image API

Create a Templated image

create_templated_image
DestructiveIdempotent

Creates an image from a saved template using template_values for its variable substitutions. Use a known template_id directly, or call list_templates to find one by name. Omit version to use the latest version. Returns asset ID, URL, and format information in item; include_image_data requests an inline preview. Use create_template to save a new reusable design before rendering it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoTemplate version to render. Pass item.template_version from create_template or update_template, or an entry's version from list_template_versions. Omit to use the latest version.
template_idYesExact template ID: use item.template_id from create_template or update_template, or an entry's id from list_templates. When only a name is known, resolve it with list_templates first.
template_valuesYesJSON object keyed by template variable names without braces: for {{title}}, pass {"title":"Example"}. Supply every required value and preserve the variable names' casing.
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. Changed6 schema fields changed
    • changedInput schema / properties / template_id / description
      Previous value: -"The exact template ID to render. When only a name is known, resolve it with list_templates first."New value: +"Exact template ID: use item.template_id from create_template or update_template, or an entry's id from list_templates. When only a name is known, resolve it with list_templates first."
    • changedInput schema / properties / template_values / description
      Previous value: -"Values keyed by the template's {{VARIABLE}} placeholders. Supply every value required for the requested render."New value: +"JSON object keyed by template variable names without braces: for {{title}}, pass {\"title\":\"Example\"}. Supply every required value and preserve the variable names' casing."
    • changedInput schema / properties / version / description
      Previous value: -"The version of the specified template, if not provided, it will default to the most recent version."New value: +"Template version to render. Pass item.template_version from create_template or update_template, or an entry's version from list_template_versions. Omit to use the latest version."
    • 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."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Adds value beyond annotations by explaining what is returned (asset ID, URL, format information in item) and what include_image_data does. Annotations already flag destructiveHint and readOnlyHint, so the description does not need to repeat those. It does not expand on state-changing side effects, but the annotation covers that.

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 main action and key workflow guidance are front-loaded. Each sentence contributes either to understanding the tool or to selecting the right template/version path. It is concise while remaining informative.

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?

The description is complete for a tool with a rich input schema and output schema. It covers how to find a template, how to choose a version, what the response contains, and when to use create_template. No critical behavioral or workflow information 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%, with detailed parameter descriptions already present. The tool description paraphrases some parameter behavior ('Omit version to use the latest version', 'include_image_data requests an inline preview') but adds little new semantic meaning beyond the schema. Baseline 3 is appropriate.

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 a saved template using template_values for its variable substitutions.' This clearly distinguishes it from generic create_image and ties it to templates. The mention of list_templates and create_template further clarifies its role among sibling tools.

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

Usage Guidelines4/5

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

Provides clear operational guidance: use a known template_id, resolve unknown names via list_templates, omit version for latest, and use create_template to save a reusable design before rendering. It does not explicitly say when NOT to use this tool versus create_image or create_batch_images, so it stops short of a full 5.

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