Skip to main content
Glama

Start template chat

create_template
Idempotent

Create a template and start its chat with one message. The chat belongs to the template. Words, HTML, or a source image start billed AI work; an image recreate is inspired by the source, not a pixel copy. input.type source compiles your own template with no AI credits. Without source, version 1 is a blank design. An AI message often takes a minute or two. Poll get_template until chat.messages shows the message succeeded. With outcome draft and chat.current_draft true, call publish_template. With outcome needs_detail, the message asked for no change: read its reply, nothing changed, and it cost 0 credits. To save HTML as a template without a chat, use save_template.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoTemplate name.
inputYes
outputNo
sourceNoVersion 1 source. Omit it to start from a blank design.
brand_kit_idNoBrand kit ID for the chat. Omit it to build without a brand.
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
    • changedInput schema / properties / brand_kit_id / description
      Previous value: -"Brand kit ID."New value: +"Brand kit ID for the chat. Omit it to build without a brand."
    • 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 / name
      Added value: +{
      +  "description": "Template name.",
      +  "maxLength": 120,
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Version 1 source. Omit it to start from a blank design.",
      +  "maxLength": 1048576,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "brand_kit_id",
      -  "idempotency_key",
      -  "input"
      -]New value: +[
      +  "idempotency_key",
      +  "input"
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the generic safety profile (readOnly=false, idempotent=true, openWorld=true), while the description adds the costly specifics: 50 vs 25 credit reservations, that an AI message takes a minute or two and must be polled, that a needs_detail reply costs 0 credits and changes nothing, and that a source-type input burns no AI credits. This is materially more than the annotations provide.

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 and the source-vs-AI distinction are front-loaded, and every sentence carries routing, billing, or outcome information. It runs long at roughly eight sentences, and the interleaving of billing facts with workflow steps makes it denser than it needs to be.

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?

For a 6-parameter, open-world, credit-spending tool with no output schema, the description supplies the full async workflow, credit implications, and outcome-dependent next calls. It omits any guidance on the output parameter's format selection and on brand_kit_id usage, which are the remaining gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 67% schema coverage, the description still adds value by explaining what input.type 'source' means (own template compiled, no AI credits) and by tying sample_data to every {{variable}} except brand-kit fields. It leaves output, brand_kit_id, and name unelaborated, so it does not fully compensate for the coverage gap.

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 ('Create a template and start its chat with one message') and immediately distinguishes itself from the nearest sibling by naming save_template for the no-chat case. An agent can tell this apart from save_template, edit_template, and publish_template without opening any 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?

Gives explicit routing: poll get_template until the message succeeds, then call publish_template when outcome is draft and chat.current_draft is true, and do nothing further when outcome is needs_detail. It also names the alternative (save_template) for saving HTML without a chat, so both when-to-use and when-not-to-use are covered.

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