Skip to main content
Glama

Ray notifications

Update template draft

update_template_draft

Replace a template's draft (PATCH /templates/{id}; write scope). This is a full replacement, not a partial patch: pass content, logTitle, logDescription and paramOverrides as they should end up (get_template first). name, folder and channelKind are required for validation but not changed (channelKind must equal the original). Live sends keep using the published version until you publish, either with publish: true here or publish_template. Fails on archived templates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name, unique per workspace (archived templates included).
folderNoOptional folder path for organisation, e.g. "billing".
contentYesChannel-shaped template body; the shape is fixed by `channelKind`: email_html → `{ subject, bodyHtml, bodyText }`; fcm_basic → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_text → `{ text }`; discord_text → `{ content }` (max 2000 chars); telegram_text → `{ text, disableLinkPreview? }`; sms_text → `{ text }` (plain text, max 1600; long text is split into several billed SMS — on sendsms_mn into parts of 159 plain-Latin / 69 Cyrillic chars); webhook_json → `{ title, body, data?: { [key]: string } }`. Use `{{name}}` placeholders and `{{#items}}…{{/items}}` sections; the required params are derived from them automatically.
publishNotrue = publish this version immediately so sends by templateId use it. Default false (saved as draft).
logTitleYesShort title shown in the in-app feed and delivery logs, e.g. "Invoice {{number}} is due". Placeholders allowed.
templateIdYesThe template id (UUID).
channelKindYesWhich channel family the template renders for. Must match the `templateKind` of the channels you will send through (list_channels). Can't be changed after creation.
logDescriptionYesOne-line description for the in-app feed and delivery logs. Placeholders allowed.
paramOverridesNoPer-param metadata keyed by param name: `{ optional?: boolean, description?: string }`. Mark a placeholder optional so sends may omit it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / content / description
      Previous value: -"Channel-shaped template body; the shape is fixed by `channelKind`: email_html → `{ subject, bodyHtml, bodyText }`; fcm_basic → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_text → `{ text }`; discord_text → `{ content }` (max 2000 chars); telegram_text → `{ text, disableLinkPreview? }`; sms_text → `{ text }` (plain text, max 1600; sendsms_mn channels only send up to 159 chars after rendering); webhook_json → `{ title, body, data?: { [key]: string } }`. Use `{{name}}` placeholders and `{{#items}}…{{/items}}` sections; the required params are derived from them automatically."New value: +"Channel-shaped template body; the shape is fixed by `channelKind`: email_html → `{ subject, bodyHtml, bodyText }`; fcm_basic → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_text → `{ text }`; discord_text → `{ content }` (max 2000 chars); telegram_text → `{ text, disableLinkPreview? }`; sms_text → `{ text }` (plain text, max 1600; long text is split into several billed SMS — on sendsms_mn into parts of 159 plain-Latin / 69 Cyrillic chars); webhook_json → `{ title, body, data?: { [key]: string } }`. Use `{{name}}` placeholders and `{{#items}}…{{/items}}` sections; the required params are derived from them automatically."
  2. Changed2 schema fields changed
    • changedInput schema / properties / channelKind / enum
      Previous value: -[
      -  "email_html",
      -  "fcm_basic",
      -  "slack_text",
      -  "discord_text",
      -  "telegram_text",
      -  "webhook_json"
      -]New value: +[
      +  "email_html",
      +  "fcm_basic",
      +  "slack_text",
      +  "discord_text",
      +  "telegram_text",
      +  "sms_text",
      +  "webhook_json"
      +]
    • changedInput schema / properties / content / description
      Previous value: -"Channel-shaped template body; the shape is fixed by `channelKind`: email_html → `{ subject, bodyHtml, bodyText }`; fcm_basic → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_text → `{ text }`; discord_text → `{ content }` (max 2000 chars); telegram_text → `{ text, disableLinkPreview? }`; webhook_json → `{ title, body, data?: { [key]: string } }`. Use `{{name}}` placeholders and `{{#items}}…{{/items}}` sections; the required params are derived from them automatically."New value: +"Channel-shaped template body; the shape is fixed by `channelKind`: email_html → `{ subject, bodyHtml, bodyText }`; fcm_basic → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_text → `{ text }`; discord_text → `{ content }` (max 2000 chars); telegram_text → `{ text, disableLinkPreview? }`; sms_text → `{ text }` (plain text, max 1600; sendsms_mn channels only send up to 159 chars after rendering); webhook_json → `{ title, body, data?: { [key]: string } }`. Use `{{name}}` placeholders and `{{#items}}…{{/items}}` sections; the required params are derived from them automatically."
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only provide read/write hints, so the description carries the behavioral burden and does it well: full replacement vs merge, draft-not-live semantics, publish-triggering behavior, and the archived-template failure case are all disclosed. This goes far beyond what the sparse annotations convey.

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 dense sentences carry a large amount of information with no filler. Critical constraints are front-loaded: full replacement first, then required-but-unchanged fields, then live-publish behavior and failure conditions.

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?

Despite having no output schema, the description covers all invocation-critical context: mutation semantics, required fields, publish behavior, and error case. The rich param schema already handles per-field details, so nothing needed for correct use is missing.

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?

Schema coverage is 100%, so the schema already documents each parameter thoroughly. The description adds valuable cross-parameter semantics: `name`, `folder`, and `channelKind` must be passed but are not changed, `channelKind` must match the original, and `paramOverrides` should be passed as the final desired state. This meaningfully supplements the schema.

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: 'Replace a template's draft', and clarifies the HTTP operation (PATCH /templates/{id}). It distinguishes itself from a partial patch and implicitly from publish_template by explaining the publish flow, making the tool's purpose unmistakable.

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 explicitly tells the agent to call get_template first, says which fields are required for validation but not changed, and names the sibling publish_template as the alternative or the `publish: true` flag. It even warns about archived templates failing, leaving no ambiguity about when and how to use this tool.

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.