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? }`; 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. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false), the description discloses the write scope, the full-replacement semantics, and the crucial fact that live sends keep using the published version until publishing. It also reveals validation-only parameters (`name`, `folder`, `channelKind`) that are required but not changed, and the archived-template failure case—all valuable behavioral context.

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 dense but every sentence carries essential information: the operation and method, the full-replacement rule, the publication behavior, and the archived failure condition. It is front-loaded with the primary purpose and avoids repeating schema details.

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?

Given the tool's complexity—9 parameters, nested content shapes, validation-only fields, and publish behavior—the description covers all critical invocation aspects: how to prepare parameters, whether to use publish, the live-send behavior, and an error condition. No output schema exists, but the description provides enough to call the tool correctly.

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 baseline is 3, but the description adds meaningful semantics beyond the schema: it identifies which parameters are changed vs. validation-only, stresses that `channelKind` must equal the original, and explains the delivery of `content`, `logTitle`, `logDescription` and `paramOverrides`. This helps the agent understand the overall replacement contract rather than just per-field constraints.

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 states a specific verb ('Replace'), a precise resource ('a template's draft'), and the exact API operation ('PATCH /templates/{id}'). It also clarifies that this is a full replacement, not a partial patch, and explicitly contrasts with the sibling publish_template, so an agent can distinguish it without opening the 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?

The description gives explicit when-to-use guidance: call get_template first, pass the full intended state, and rely on `publish: true` here or publish_template to affect live sends. It also states an important exclusion—'Fails on archived templates'—which prevents the agent from attempting invalid updates.

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.