Skip to main content
Glama

create_workflow

Creates ready-to-run ComfyUI workflow JSON from built-in templates, applies edits, and validates it without executing.

Instructions

Author and check ComfyUI workflow JSON. Driven by the action parameter:

  • action:"create" — Create a ready-to-run API-format workflow from a built-in template (txt2img, img2img, upscale, inpaint, controlnet, ip_adapter, ace_step_15, stable_audio_3, remove_background, ltx_video). Pure local generation — does not contact ComfyUI and has no side effects. Returns the complete workflow JSON; pass it to action:"validate" or enqueue_workflow. Unsupplied params fall back to template defaults, so the result may reference checkpoints/models that must exist on your ComfyUI server before it will execute.

  • action:"modify" — Apply modification operations to an existing workflow. Supports: set_input, add_node, remove_node, connect, insert_between. Returns the modified workflow JSON and IDs of any newly added nodes.

  • action:"validate" — Validate a workflow WITHOUT executing it. Checks for missing node types, broken connections, invalid output indices, missing models, and other issues. Returns a list of errors and warnings.

  • action:"node_info" — Query a running ComfyUI server's /object_info endpoint for installed node type definitions. Requires a reachable ComfyUI instance; results reflect that server's installed custom nodes. Use the node_type filter to inspect a specific node before composing or modifying a workflow. Default response is a STRUCTURAL summary: input/output names and type tags, with enum (dropdown) inputs collapsed to a value count — safe for context even on Loader nodes whose model dropdowns embed the entire local model list (hundreds of KB raw). Pass verbose=true (20 or fewer matches) for the complete raw definitions including every dropdown value. When more than 20 node types match, returns only a name/category list and asks you to narrow the filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich authoring operation to perform. "create" requires `template` (optional `params`); "modify" requires `workflow` + `operations`; "validate" requires `workflow` (optional `health`); "node_info" takes no required parameters (optional `node_type`, `verbose`, `refresh`).
healthNoaction:"validate" — Include graph-health heuristics (disconnected nodes, duplicate model loads, orphaned branches, muted/bypassed nodes) as info/warning issues plus a structured health section. Never affects `valid`.
paramsNoaction:"create" — Template parameters; recognized keys depend on the template. txt2img: checkpoint, positive_prompt, negative_prompt, width, height, steps, cfg, seed, sampler_name, scheduler. img2img/inpaint add image_path (and mask_path for inpaint) and denoise. upscale adds upscale_model. Unknown keys are ignored; omitted keys use template defaults.
refreshNoaction:"node_info" — If true, discard the memoized /object_info snapshot and refetch live from the connected server before answering. Use after the ComfyUI server was restarted EXTERNALLY (systemd/service manager) or new model files were added out-of-band — the cache is otherwise only invalidated by MCP-managed restarts, so loader dropdowns (model lists) would remain stale for the rest of the session (#499).
verboseNoaction:"node_info" — If true, return the full raw /object_info definitions including enum dropdown values (model lists etc.) — can be hundreds of KB per Loader node, so only use it when you need the actual enum values (e.g. exact model filenames) and the filter matches few nodes. Default false: structural summary with enum value counts.
templateNoaction:"create" (REQUIRED) — Template name, one of: txt2img, img2img, upscale, inpaint, controlnet, ip_adapter, ace_step_15, stable_audio_3, remove_background, ltx_video
workflowNoComfyUI workflow JSON (as a JSON string or object). REQUIRED for action:"modify" and action:"validate". action:"validate" accepts API format or a saved UI export (nodes[]/links[]).
node_typeNoaction:"node_info" — Filter by node class_type name (case-insensitive substring match). Omit to list all available nodes.
operationsNoaction:"modify" (REQUIRED) — Array of operations to apply in order. Each has an 'op' field: set_input, add_node, remove_node, connect, or insert_between
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it excels. It explicitly states side-effect-free behavior for `create` ('does not contact ComfyUI and has no side effects'), that `validate` does not execute, that `node_info` requires a reachable ComfyUI instance, and even discloses the staleness caveat with `refresh`. It also warns that `create` may reference models that must exist on the server. This is transparent and comprehensive.

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 long but highly structured and information-dense. It begins with a one-line purpose statement, then uses bullet points for each action, making it easy to scan. Every sentence adds value, such as listing template names, operation types, and clear return-value expectations. There is no redundancy or filler; it is appropriately sized for the tool's complexity.

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?

The description fully covers all four actions, their parameters, and return values. It explains that `create` returns the complete workflow JSON, `modify` returns modified JSON plus new node IDs, `validate` returns errors/warnings, and `node_info` returns structural or verbose definitions. It also notes the acceptable input formats for `validate` (API or saved UI export). Given no output schema, this is complete guidance for an agent 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?

While the schema covers 100% of parameters with detailed descriptions, the description adds meaningful behavioral context beyond the schema. For example, it explains that unsupplied `params` fall back to template defaults and that the result may reference models that must exist on the ComfyUI server. For `node_info` it describes the structural summary vs. verbose output and the 20-node threshold. These extras go beyond the schema's property descriptions, justifying a score above the baseline of 3.

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 clearly states the tool's purpose: 'Author and check ComfyUI workflow JSON.' It then breaks down each action (`create`, `modify`, `validate`, `node_info`) with specific verbs and resources, making it obvious what each operation does. It also distinguishes itself from siblings by noting that `create` is 'pure local generation' with no ComfyUI contact, which differentiates it from `enqueue_workflow`.

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 provides explicit routing guidance: it tells the agent to pass the output of `create` to `validate` or `enqueue_workflow`, explaining that `validate` runs without executing, and `node_info` is for inspecting installed node types. It also clarifies when to use `refresh` and `verbose`, giving clear contextual triggers. This is strong usage guidance with direct references to alternative tools.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/artokun/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server