list_workflows
List pre-loaded workflow templates shipped with the ComfyUI MCP server to use as baselines for image generation and processing tasks.
Instructions
List built-in workflow templates shipped with this MCP server. These are the named workflows that can be used as a baseline; for arbitrary workflows use generate_with_workflow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/models.ts:38-54 (handler)The handler/definition of the 'list_workflows' tool. It registers an MCP tool named 'list_workflows' on the server, takes no arguments (empty schema), and returns a list of built-in workflow names from BUILTIN_WORKFLOWS.
server.tool( "list_workflows", "List built-in workflow templates shipped with this MCP server. These are the named workflows that can be used as a baseline; for arbitrary workflows use generate_with_workflow.", {}, async () => { const body = BUILTIN_WORKFLOWS.map( (name, i) => ` ${i + 1}. ${name}`, ).join("\n"); return { content: [ { type: "text" as const, text: `Built-in workflows (${BUILTIN_WORKFLOWS.length}):\n${body}`, }, ], }; }, - src/tools/models.ts:41-41 (schema)The input schema for 'list_workflows' — an empty object literal `{}`, meaning the tool accepts no arguments.
{}, - src/comfyui/workflows.ts:310-316 (helper)Definition of BUILTIN_WORKFLOWS: the constant array of workflow names ['txt2img', 'img2img', 'upscale', 'controlnet', 'ip_adapter'] that the 'list_workflows' tool reads from.
export const BUILTIN_WORKFLOWS = [ "txt2img", "img2img", "upscale", "controlnet", "ip_adapter", ] as const; - src/server.ts:45-45 (registration)Registration call: `registerModelTools(s, client)` is invoked in buildContext() to register the 'list_workflows' (and 'list_models') tools on the MCP server.
registerModelTools(s, client); - src/tools/models.ts:13-16 (registration)The export function `registerModelTools` that wires up the tool registration (called from server.ts).
export function registerModelTools( server: McpServer, client: ComfyUIClient, ): void {