Skip to main content
Glama

Save Template

save_template
Destructive

Create a canonical company template, or replace one by passing template_id with expected_revision. Send typed GenerationCommand objects; updates are complete replacements. This persists the template and does not generate images. Templates are single-generation presets. Use Production Workflows in the Automation workspace for reusable multi-step generation. Legacy batch Templates are read-only history and cannot be created, edited, or imported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name
payloadYesVersioned template payload containing canonical generation commands
descriptionNoOptional sentence explaining when to use the template
template_idNoTemplate ID when replacing an existing template
catalog_scopeNoTemplate catalog scope: library or owner_onlylibrary
template_kindYesTemplate kind: generation_preset. Legacy batch_workflow writes are retired.
expected_revisionNoCurrent revision when replacing an existing template; omit for create

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / $defs / GenerationReferenceAttachmentInput / properties / outfit_id
      Added value: +{
      +  "default": null,
      +  "description": "Outfit reference. The generation uses the front image of every garment in the outfit, as if each were attached as clothing_item.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / $defs / GenerationReferenceAttachmentInput / properties / type / enum
      Previous value: -[
      -  "uploaded_file",
      -  "generation_result",
      -  "location",
      -  "avatar",
      -  "clothing_item"
      -]New value: +[
      +  "uploaded_file",
      +  "generation_result",
      +  "location",
      +  "avatar",
      +  "clothing_item",
      +  "outfit"
      +]
  2. Changed1 schema field changed
    • addedInput schema / $defs / GenerationIntent / properties / generate_audio / description
      Added value: +"Include audio in the delivered video. False delivers a file with no audio stream; fixed-audio providers are muted after generation, without reducing native-generation credits."
  3. Changed2 schema fields changed
    • addedInput schema / $defs / TemplateKind / description
      Added value: +"generation_preset is writable; batch_workflow is retained read-only history."
    • changedInput schema / properties / template_kind / description
      Previous value: -"Template kind: generation_preset or batch_workflow"New value: +"Template kind: generation_preset. Legacy batch_workflow writes are retired."
  4. Changed2 schema fields changed
    • addedInput schema / $defs / GenerationIntent / properties / audio_ref_urls
      Added value: +{
      +  "default": null,
      +  "description": "Public audio URLs supplied as model references. Only models that declare a positive max_reference_audio capability accept them.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / $defs / GenerationIntent / properties / video_ref_urls
      Added value: +{
      +  "default": null,
      +  "description": "Public video URLs supplied as model references. Only models that declare a positive max_reference_videos capability accept them.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. Changed1 schema field changed
    • changedInput schema / $defs / GenerationIntent / properties / prompt / description
      Previous value: -"Scene brief for this shot: setting, lighting, mood, camera/framing, pose — 2-5 compact positive sentences. Without art_direction_id this prompt reaches the image model as-is and is the entire creative direction: carry the shoot's world, lighting, and atmosphere here. With art_direction_id, the saved direction carries reusable style; add only per-shot intent. Supplied garment/avatar/reference images carry product appearance: refer to them semantically ('the supplied jacket'), never by image number — the backend appends the numbered reference map at dispatch. Styling intent (fit, tuck, drape, opening state) belongs here when it matters; re-described garment construction, product-fidelity warnings, and negative 'do not ...' blocks do not — with good references they degrade output. Say what to show, not what to avoid. Video commands: describe motion and camera movement. May be empty for upscale; generation routes validate separately."New value: +"Scene brief for this shot: setting, lighting, mood, camera/framing, pose — 2-5 compact positive sentences. Without art_direction_id this prompt reaches the image model as-is and is the entire creative direction: carry the shoot's world, lighting, and atmosphere here. With art_direction_id, the saved direction carries reusable style; add only per-shot intent. Supplied garment/avatar/reference images carry product appearance: refer to them semantically ('the supplied jacket'), never by image number — the backend appends the numbered reference map at dispatch. Styling intent (fit, tuck, drape, opening state) belongs here when it matters; re-described garment construction, product-fidelity warnings, and negative 'do not ...' blocks do not — with good references they degrade output. Say what to show, not what to avoid. Video commands: describe motion and camera movement. Video does not inherit the source generation's ArtDirection; omit art_direction_id to use only the source frame and this prompt. May be empty for upscale; generation routes validate separately."
  6. Changed1 schema field changed
    • addedInput schema / $defs / GenerationIntent / properties / last_frame_attachment
      Added value: +{
      +  "$ref": "#/$defs/GenerationReferenceAttachmentInput",
      +  "default": null,
      +  "description": "Durable reference to the photo the clip closes on, resolved to a URL at dispatch. The durable form of last_frame_url, for callers that hold an id rather than a link — a workflow wiring a step's output into a later step's last frame cannot know the URL when the graph is authored."
      +}
  7. Changed4 schema fields changed
    • changedInput schema / $defs / GenerationIntent / description
      Previous value: -"Caller-owned model-generation intent shared by every public adapter.\n\nAuthentication-derived identity deliberately does not belong here. REST,\nAgent, MCP, batch, and integrations all submit this exact contract; the\ncommand planner combines it with server-owned execution context later."New value: +"Caller-owned model-generation intent shared by every public adapter.\n\nAuthentication-derived identity deliberately does not belong here. REST,\nAgent, MCP, batch, and integrations all submit this exact contract; the\ncommand planner combines it with server-owned execution context later. MCP omits webhook callback configuration, which remains API-only."
    • removedInput schema / $defs / GenerationIntent / properties / webhook_events
      Removed value: -{
      -  "default": null,
      -  "items": {
      -    "enum": [
      -      "generation.completed",
      -      "generation.failed"
      -    ],
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / $defs / GenerationIntent / properties / webhook_secret
      Removed value: -{
      -  "default": null,
      -  "description": "Optional HMAC signing secret for customer callbacks.",
      -  "type": "string",
      -  "ui": {
      -    "sensitive": true
      -  }
      -}
    • removedInput schema / $defs / GenerationIntent / properties / webhook_url
      Removed value: -{
      -  "default": null,
      -  "type": "string"
      -}
  8. Changed5 schema fields changed
    • removedInput schema / $defs / GenerationCommand / properties / source / discriminator / mapping
      Removed value: -{
      -  "generation_result": "#/$defs/GenerationResultCommandSource",
      -  "pipeline_step": "#/$defs/PipelineStepCommandSource",
      -  "public_url": "#/$defs/PublicUrlCommandSource",
      -  "uploaded_file": "#/$defs/UploadedFileCommandSource"
      -}
    • removedInput schema / $defs / GenerationResultCommandSource
      Removed value: -{
      -  "properties": {
      -    "generation_result_id": {
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "type": {
      -      "const": "generation_result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type",
      -    "generation_result_id"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / $defs / PipelineStepCommandSource
      Removed value: -{
      -  "description": "Durable identity for a source produced by an earlier pipeline step.",
      -  "properties": {
      -    "output_index": {
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "post_claim_reference": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "step_index": {
      -      "minimum": 0,
      -      "type": "integer"
      -    },
      -    "type": {
      -      "const": "pipeline_step",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type",
      -    "post_claim_reference",
      -    "step_index",
      -    "output_index"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / $defs / PublicUrlCommandSource
      Removed value: -{
      -  "properties": {
      -    "image_url": {
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "type": {
      -      "const": "public_url",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type",
      -    "image_url"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / $defs / UploadedFileCommandSource
      Removed value: -{
      -  "properties": {
      -    "type": {
      -      "const": "uploaded_file",
      -      "type": "string"
      -    },
      -    "uploaded_file_id": {
      -      "minimum": 1,
      -      "type": "integer"
      -    }
      -  },
      -  "required": [
      -    "type",
      -    "uploaded_file_id"
      -  ],
      -  "type": "object"
      -}
  9. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, and the description adds genuinely non-obvious behavior beyond that: 'updates are complete replacements' (full overwrite, not patch), the expected_revision concurrency requirement, and the fact that it 'persists the template and does not generate images.' No contradiction with annotations; the only unstated behaviors are revision-conflict handling and authorization requirements.

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?

Five dense sentences with the primary purpose front-loaded. Each sentence earns its place: create/replace semantics, complete-replacement behavior, persistence and non-generation, single-generation scope, and routing to alternatives. Slightly long but zero redundancy with the schema.

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 create/replace tool with a fully self-documenting schema (100% description coverage) and destructive hint already set, the description covers the critical decision layer: when to use, what the payload must be, what the operation does and does not do, and where the alternatives lie. Remaining gaps are minor — no mention of revision-conflict error behavior or return value, but no output schema exists and these are secondary for a save operation.

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. The description adds usage-level meaning by pairing template_id with expected_revision in the replacement path and by framing the payload contract — 'Send typed GenerationCommand objects; updates are complete replacements' — which tells the agent the payload is structured and the operation is wholesale, not incremental.

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+resource pair — 'Create a canonical company template, or replace one by passing template_id with expected_revision' — and further disambiguates from image-generation siblings by stating it 'does not generate images,' and from legacy templates by declaring them read-only history. An agent can distinguish this tool from list_templates, get_template, delete_template, and generation tools 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/when-not guidance with named alternatives: single-generation presets belong here; 'Use Production Workflows in the Automation workspace for reusable multi-step generation'; and 'Legacy batch Templates are read-only history and cannot be created, edited, or imported.' This is the strongest form of usage guidance — explicit exclusions plus alternative tooling.

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