Skip to main content
Glama

Update template

update_template
DestructiveIdempotent

Update a saved template's DSL, name, description, and/or sampleData. Revalidates the DSL when provided. A DSL that differs from the stored one is recorded in the template's revision history (History tab on /templates/:id); sending the same DSL again records nothing, and name, description and sampleData are overwritten without history. For description and sampleData: pass null to clear; omit to leave unchanged. Returns { templateId, name, updatedAt }. Mirrors PUT /api/v1/templates/:id.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "templateId": "<templateId>"
    },
    "name": "update_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
dslNoReplacement builder DSL script; it is validated before saving. Omit to keep the current DSL. Up to 512KB.
nameNoNew display name. Omit to keep the current name.
sampleDataNoReplacement sample binding data, stored alongside the template and returned by get_template (the web editor loads it into its Render data panel). It does not change what render_template uses without `data`: that is the DSL's own `const sampleData`. `null` clears the stored value; omit to leave it unchanged.
templateIdYesTemplate ID — slug for library rows (e.g. 'invoice-classic') or UUID for user rows.
descriptionNoNew one-sentence summary. Pass `null` to clear the stored value; omit the key entirely to leave it unchanged.

Output Schema

NameRequiredDescriptionDefault
nameYesThe display name after the update.
updatedAtYesWhen the template was changed, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp.
templateIdYesTemplate ID: a slug for library templates, a UUID for your own.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / sampleData / type
      Added value: +[
      +  "object",
      +  "array",
      +  "string",
      +  "number",
      +  "boolean",
      +  "null"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "name": {
      +      "description": "The display name after the update.",
      +      "type": "string"
      +    },
      +    "templateId": {
      +      "description": "Template ID: a slug for library templates, a UUID for your own.",
      +      "type": "string"
      +    },
      +    "updatedAt": {
      +      "description": "When the template was changed, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "templateId",
      +    "name",
      +    "updatedAt"
      +  ],
      +  "type": "object"
      +}
  3. Changed4 schema fields changed
    • changedInput schema / properties / description / description
      Previous value: -"Optional one-sentence summary (max 280 chars). Pass `null` (instead of a string) to clear the stored value; omit the key entirely to leave it unchanged."New value: +"New one-sentence summary. Pass `null` to clear the stored value; omit the key entirely to leave it unchanged."
    • changedInput schema / properties / dsl / description
      Previous value: -"Replacement builder DSL script (<=512KB)."New value: +"Replacement builder DSL script; it is validated before saving. Omit to keep the current DSL. Up to 512KB."
    • addedInput schema / properties / name / description
      Added value: +"New display name. Omit to keep the current name."
    • changedInput schema / properties / sampleData / description
      Previous value: -"Optional JSON binding data. `null` clears the stored value; omit to leave unchanged."New value: +"Replacement sample binding data, stored alongside the template and returned by get_template (the web editor loads it into its Render data panel). It does not change what render_template uses without `data`: that is the DSL's own `const sampleData`. `null` clears the stored value; omit to leave it unchanged."
  4. Changed3 schema fields changed
    • changedInput schema / properties / description / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / dsl / description
      Added value: +"Replacement builder DSL script (<=512KB)."
    • addedInput schema / properties / templateId / description
      Added value: +"Template ID — slug for library rows (e.g. 'invoice-classic') or UUID for user rows."
  5. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=true) by explaining precisely what is destroyed versus preserved: only a differing DSL is versioned, identical DSL is a no-op, and the other three fields are overwritten with no history. It also names where history is visible (/templates/:id), states the return payload, and maps the call to PUT /api/v1/templates/:id.

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?

Four dense, front-loaded sentences that each carry operational information, with the destructive/versioning behavior placed early. Minor waste in repeating the 'pass null to clear; omit to leave unchanged' rule that the schema already states twice.

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?

For a destructive partial-update tool this covers the essential gaps: what is versioned, what is silently overwritten, how to clear fields, validation on write, and the response shape. An output schema exists, so the brief return mention is a bonus rather than a necessity.

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%, so all five parameters are already documented, including null-vs-omit semantics and the 512KB DSL limit. The description largely restates the null/omit rule rather than adding new meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource and enumerates exactly which fields can change ('DSL, name, description, and/or sampleData'), so the agent knows the operation's scope immediately. It does not name a sibling (e.g. save_template) to contrast with, so differentiation is implied rather than stated.

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 conditional context: DSL is revalidated when provided, changed DSL goes to revision history, unchanged DSL records nothing, and name/description/sampleData are overwritten silently. It stops short of saying when to prefer this over save_template or delete_template, and gives no prerequisites or permission notes.

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