Skip to main content
Glama

Send template chat message

edit_template
Idempotent

Send one change to the chat of a saved template. A words or HTML message reserves 25 credits. A new source image reserves 50. type source compiles your own template with no AI credits. An AI message often takes a minute or two. Poll get_template until the message succeeded. With outcome draft and chat.current_draft true, call publish_template. With outcome needs_detail, read its reply: nothing changed and it cost 0 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes
outputNo
template_idYesSaved template ID.
brand_kit_idNoBrand kit ID. It becomes the chat kit from this message on. Omit it to keep the chat kit. Send null to build without a brand from this message on.
idempotency_keyYesReuse this key only when retrying the same command. A new key starts new work and can spend credits again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / brand_kit_id
      Added value: +{
      +  "description": "Brand kit ID. It becomes the chat kit from this message on. Omit it to keep the chat kit. Send null to build without a brand from this message on.",
      +  "pattern": "^kit_[0-9a-f]{32}$",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedInput schema / properties / build_id
      Removed value: -{
      -  "description": "Template build ID.",
      -  "pattern": "^build_[0-9a-f]{32}$",
      -  "type": "string"
      -}
    • changedInput schema / properties / input / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "Billed AI work from words. A new build reserves 50 credits. A later message reserves 25.",
      -    "properties": {
      -      "prompt": {
      -        "maxLength": 65536,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "prompt"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "prompt"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Billed AI rebuild from HTML. A new build reserves 50 credits. A later message reserves 25. To save HTML without AI, use save_template.",
      -    "properties": {
      -      "html": {
      -        "maxLength": 65536,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "prompt": {
      -        "maxLength": 65536,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "html"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "html"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Billed AI work from a source image. Choose rebuild to recreate its layout or reference to guide a required prompt. PNG, JPEG, or WebP; at most 10 MiB, 7680 by 4320, and 32 million pixels. An invalid file fails before the model. A new build reserves 50 credits.",
      -    "properties": {
      -      "base64": {
      -        "contentEncoding": "base64",
      -        "description": "Still PNG, JPEG, or WebP as compact standard or URL-safe base64. A data URL prefix and whitespace are accepted. Downscale before encoding if the file is near 10 MiB. SVG is not accepted.",
      -        "maxLength": 13981016,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "prompt": {
      -        "maxLength": 65536,
      -        "type": "string"
      -      },
      -      "purpose": {
      -        "enum": [
      -          "rebuild",
      -          "reference"
      -        ],
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "image"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "base64",
      -      "purpose"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Your own template source. No AI call and 0 credits. Poll get_status until succeeded, then publish_template. Put a sample_data value for every {{variable}} except brand fields from the selected kit.",
      -    "properties": {
      -      "sample_data": {
      -        "description": "Values for every {{variable}} in source, except brand fields from the selected kit. Omit it only when the source has no variables.",
      -        "type": "object"
      -      },
      -      "schema": {
      -        "type": [
      -          "object",
      -          "boolean"
      -        ]
      -      },
      -      "source": {
      -        "maxLength": 1048576,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "source"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "source"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "description": "Billed AI work from words. The first message of a new blank template reserves 50 credits. Every other message reserves 25.",
      +    "properties": {
      +      "prompt": {
      +        "maxLength": 65536,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "prompt"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "prompt"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Billed AI rebuild from HTML. The first message of a new blank template reserves 50 credits. Every other message reserves 25. To save HTML without AI, use save_template.",
      +    "properties": {
      +      "html": {
      +        "maxLength": 65536,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "prompt": {
      +        "maxLength": 65536,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "html"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "html"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Billed AI work from a source image. Choose rebuild to recreate its layout or reference to guide a required prompt. PNG, JPEG, or WebP; at most 10 MiB, 7680 by 4320, and 32 million pixels. An invalid file fails before the model. Reserves 50 credits.",
      +    "properties": {
      +      "base64": {
      +        "contentEncoding": "base64",
      +        "description": "Still PNG, JPEG, or WebP as compact standard or URL-safe base64. A data URL prefix and whitespace are accepted. Downscale before encoding if the file is near 10 MiB. SVG is not accepted.",
      +        "maxLength": 13981016,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "prompt": {
      +        "maxLength": 65536,
      +        "type": "string"
      +      },
      +      "purpose": {
      +        "enum": [
      +          "rebuild",
      +          "reference"
      +        ],
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "image"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "base64",
      +      "purpose"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Your own template source. No AI call and 0 credits. Poll get_template until the message succeeded, then publish_template. Put a sample_data value for every {{variable}} except brand fields from the selected kit.",
      +    "properties": {
      +      "sample_data": {
      +        "description": "Values for every {{variable}} in source, except brand fields from the selected kit. Omit it only when the source has no variables.",
      +        "type": "object"
      +      },
      +      "schema": {
      +        "type": [
      +          "object",
      +          "boolean"
      +        ]
      +      },
      +      "source": {
      +        "maxLength": 1048576,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "source"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "source"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / template_id
      Added value: +{
      +  "description": "Saved template ID.",
      +  "pattern": "^tpl_[0-9a-f]{32}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "build_id",
      -  "idempotency_key",
      -  "input"
      -]New value: +[
      +  "template_id",
      +  "idempotency_key",
      +  "input"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare non-readonly, idempotent, non-destructive, open-world, so the safety profile is covered. The description adds real behavioral value beyond that: credit reservations (25/50/0), AI latency of a minute or two, and the zero-cost no-op on needs_detail.

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?

Purpose is front-loaded and every clause carries information; nothing is filler. The telegraphic, run-on style ('A words or HTML message reserves 25 credits') is dense but efficient rather than bloated.

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?

With no output schema, the description helpfully surfaces the response outcome semantics (draft, needs_detail) and the polling/follow-up flow. It does not enumerate other possible outcomes or failure states, leaving a small gap for a mutation tool with credit implications.

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 60% and the schema already documents the input oneOf variants, costs, and the template_id/idempotency_key/brand_kit_id fields. The description paraphrases the type-cost mapping and mentions the source type but adds no syntax or semantics beyond what the schema states, so a baseline 3 is right.

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 concrete verb and resource: send one change to the chat of a saved template. It distinguishes itself from siblings by naming get_template (poll) and publish_template (next step), so an agent can place it in the workflow without opening other schemas.

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?

Gives clear post-call routing: poll get_template, and branch on outcome draft/chat.current_draft to publish_template or on needs_detail to read the reply. It also notes type source avoids AI credits and the schema routes non-AI HTML to save_template, but there is no explicit statement of when not to use this tool versus adapt_template or create_template.

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