Skip to main content
Glama

create_workflow

Initialize an empty workflow structure in ComfyUI for building custom image generation pipelines by adding nodes sequentially.

Instructions

Create an empty workflow structure.

Returns an empty dict that you can populate with add_node().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'create_workflow' tool. Decorated with @mcp.tool(), it returns an empty dictionary representing a new workflow, optionally logging via context.
    @mcp.tool() def create_workflow(ctx: Context = None) -> dict: """Create an empty workflow structure. Returns an empty dict that you can populate with add_node(). """ if ctx: ctx.info("Creating new workflow") return {}
  • Within register_all_tools(mcp), this line calls register_workflow_tools(mcp), which defines and registers the create_workflow tool using @mcp.tool() decorator.
    register_workflow_tools(mcp)
  • Top-level registration call in the server initialization that triggers the chain leading to create_workflow tool registration.
    register_all_tools(mcp)

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/IO-AtelierTech/comfyui-mcp'

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