Skip to main content
Glama

save_template

Save ComfyUI workflows as persistent, reusable templates with descriptive names, tags, categories, and default settings so you can search and retrieve them later.

Instructions

Save a workflow as a reusable template. Use descriptive names that indicate the purpose (e.g., 'portrait_lighting_studio', 'product_photo_white_bg'). Templates are stored persistently and can be searched and retrieved later.

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": {
      "id": "<id>",
      "name": "<name>",
      "description": "<description>",
      "workflow": "<workflow>"
    },
    "name": "save_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesUnique template ID (e.g., 'my_flux_style', 'upscale_4x')
nameYesHuman-readable template name
tagsNoTags for searching and filtering
categoryNoCategory for organizing templatescustom
taskTypeNoType of task this template performstxt2img
workflowYesThe ComfyUI workflow JSON (API format)
modelTypeNoModel architecture this template is designed forany
descriptionYesDescription of what this template does
defaultSettingsNoDefault settings (steps, cfg, width, height, etc.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false. The description adds the fact that templates persist and can be retrieved later, which is useful context. However, it omits what happens when the id collides with an existing template (relevant because idempotentHint=false) and says nothing about overwrite or error behavior.

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?

Three short sentences, front-loaded with the action, followed by actionable naming guidance and one sentence on persistence. Every sentence earns its place and nothing is padded.

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?

This is a 9-parameter mutation tool with a nested workflow object and no output schema, so completeness matters. The description covers purpose, naming and persistence, but an agent must still infer overwrite behavior for duplicate ids and why tag/category fields matter. It is reasonably complete given the annotations already cover the safety profile.

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 goes further by giving concrete naming conventions ('portrait_lighting_studio', 'product_photo_white_bg') that the id/name schema fields do not supply. It still says nothing about tags, category, taskType or modelType beyond what the schema already documents.

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?

The description names a specific verb and resource: 'Save a workflow as a reusable template.' An agent can tell what is produced (a persisted workflow template). It does not distinguish itself from the template-related siblings (get_template, delete_template) or from save_note, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the description notes templates can be 'searched and retrieved later,' which hints at when to use it, but it never states prerequisites, when not to use it, or which sibling to choose instead. The naming advice is a best practice, not a when-to-use rule.

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