Skip to main content
Glama

Update authoring draft

update_template_draft

Refine an existing template authoring draft by draftId: patch layout AST, slot contracts, selection metadata, or theme tokens; validation warnings return on save.

Instructions

Update layer AST, slot definitions, selection metadata, or theme tokens of an existing template authoring draft by draftId. Call iteratively to refine draft layout and slot contracts during authoring. Do NOT use to create new drafts (use create_template_draft), view draft AST (use get_template_draft), or release to public catalog (use publish_template_draft). Requires draft owner authorization. Performs safe partial patch: unmentioned properties remain untouched. Automatically triggers layout rule validation on save; returns validation warnings if constraints are breached. Returns updated TemplateDraft record with latest validation status and AST snapshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoUpdated template title.
themeNoUpdated theme tokens.
draftIdYesThe unique draft identifier to update.
authoringSourceNoUpdated template AST layout structure and slot bindings.
selectionMetadataNoUpdated platform and family metadata.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDraft ID.
validationStatusNoValidation status: valid | warnings | errors

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.17
    • changedInput schema / properties / authoringSource / description
      Previous value: -"Updated template AST layout structure."New value: +"Updated template AST layout structure and slot bindings."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "id": {
      +      "description": "Draft ID.",
      +      "type": "string"
      +    },
      +    "validationStatus": {
      +      "description": "Validation status: valid | warnings | errors",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed5 schema fields changedv0.1.16
    • addedInput schema / properties / authoringSource / description
      Added value: +"Updated template AST layout structure."
    • addedInput schema / properties / draftId / description
      Added value: +"The unique draft identifier to update."
    • addedInput schema / properties / name / description
      Added value: +"Updated template title."
    • addedInput schema / properties / selectionMetadata / description
      Added value: +"Updated platform and family metadata."
    • addedInput schema / properties / theme / description
      Added value: +"Updated theme tokens."
  3. First observedv0.1.13

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false), so the read/write and idempotency question is settled structurally. The description nonetheless adds real value beyond them: draft-owner authorization requirement, safe partial-patch semantics (unmentioned properties untouched), automatic layout-rule validation on save with returned warnings, and the shape of the returned record. This is useful added context, though it stops short of describing failure modes or rate/concurrency behavior for an iterative mutation tool.

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?

Six tight sentences ordered purpose → usage → exclusions → prerequisites → mutation semantics → side effects → return. It is dense but front-loaded, and each sentence carries information an agent needs before calling; nothing is padding.

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?

An output schema exists, so return values need not be explained, yet the description still summarizes the returned TemplateDraft with validation status and AST snapshot. Combined with auth, partial-patch, and validation-trigger disclosures, it is complete enough for a 5-param mutation with nested objects; only granular failure/error behavior is unaddressed.

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 100% with all five properties documented, including the nested authoringSource, selectionMetadata, and theme objects, so the baseline is 3. The description's phrase 'layer AST, slot definitions, selection metadata, or theme tokens' loosely maps onto those parameters but adds no format, constraint, or merge-syntax detail beyond the schema's own per-field descriptions.

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?

Opens with a specific verb+resource pair ('Update ... existing template authoring draft by draftId') and enumerates the mutable facets (layer AST, slot definitions, selection metadata, theme tokens). It explicitly distinguishes itself from create_template_draft, get_template_draft, and publish_template_draft, so an agent can select it 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 positive guidance ('Call iteratively to refine draft layout and slot contracts during authoring') plus three explicit when-not cases, each naming the correct sibling for the excluded job. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.