Skip to main content
Glama

HTML/CSS to Image API

Update a Template

update_template
Destructive

Updates an existing HTML/CSS image template. Replaces its latest version when that version has not been rendered; otherwise creates a new version. Returns item.template_id and item.template_version. Call create_templated_image with the returned ID and version to render the updated design. Use list_template_versions to inspect existing content before replacing it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesComplete replacement content for the template. Preserve intentional variable names and render dimensions unless the user requests a change.
template_idYesThe exact template ID to update.

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 for images rendered from the template. Set `disable_twemoji: true` to disable automatic emoji replacement. Omitted, `null`, or `false` keeps Twemoji enabled."
  2. Changed4 schema fields changed
    • addedInput schema / properties / content / properties / selector
      Added value: +{
      +  "description": "Crop the image to the element matching this CSS selector. Prefer a unique, stable ID such as `#card` when possible.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • 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.3/5.0
Behavior4/5

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

Annotations already mark this as destructiveHint=true.icon, so the description does not need to restate that it modifies state. It adds valuable context beyond annotations: the conditional replace-versus-new-version behavior and the returned item.template_id and item.template_version identifiers. This gives the agent a meaningful model of what happens on invocation.

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?

The description is compact and each sentence earns its place: purpose, versioning behavior, return values, next step, and prerequisite inspection. It is front-loaded with the core action and avoids redundancy with the schema or annotations.

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 destructive update tool with a rich input schema, this description covers the essential behavioral nuance (version replacement/creation), the return values, the required follow-up call, and the recommended pre-inspection step. The output schema and annotations handle the remaining formal details, leaving no critical gap for an agent deciding how to call the tool.

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?

The input schema is fully documented with detailed parameter descriptions, including nested content fields-based coverage. The description itself adds little parameter-level meaning, but with schema coverage at 100%, the baseline of 3 is appropriate. The 'Returns item.template_id and item.template_version' line helps the agent understand outputs rather than parameters.

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: 'Updates an existing HTML/CSS image template.' It then explains the versioning behavior (replace unrendered latest version, otherwise create a new version), which distinguishes it from create_template and create_templated_image. The purpose is unambiguous and clearly differentiated from siblings.

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?

The description gives actionable workflow guidance: use list_template_versions to inspect existing content before replacing, and call create_templated_image with the returned ID/version to render. It does not explicitly contrast with create_template for new templates, but the 'existing' wording and versioning logic make the intended use clear.

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