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
| Name | Required | Description | Default |
|---|---|---|---|
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 {}
- src/comfy_mcp_server/tools/__init__.py:27-27 (registration)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)
- src/comfy_mcp_server/__init__.py:92-92 (registration)Top-level registration call in the server initialization that triggers the chain leading to create_workflow tool registration.register_all_tools(mcp)