Skip to main content
Glama

create_workflow

Initialize an empty workflow structure in ComfyUI for building custom image generation pipelines. Start by creating this foundation, then add nodes to construct your automation sequence.

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 handler function for the 'create_workflow' MCP tool. It creates and returns an empty workflow dictionary. The @mcp.tool() decorator handles registration and schema inference from the signature and docstring.
    @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 {}
  • The register_all_tools function calls register_workflow_tools(mcp), which defines and registers the create_workflow tool among others.
    def register_all_tools(mcp): """Register all tools with the MCP server.""" register_system_tools(mcp) register_discovery_tools(mcp) register_workflow_tools(mcp) register_execution_tools(mcp)
  • Calls register_all_tools(mcp) to register all tools including create_workflow.
    register_all_tools(mcp)
  • The register_workflow_tools(mcp) function defines the create_workflow handler inside it using @mcp.tool(), performing the actual registration.
    def register_workflow_tools(mcp): """Register workflow management 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/IO-AtelierTech/comfyui-mcp'

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