list_workflows
Retrieve built-in workflow templates for use as baseline configurations. Provides named workflows ready for customization.
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-55 (registration)The 'list_workflows' tool is registered on the MCP server via server.tool() with an empty schema object {}. The handler simply formats and returns the BUILTIN_WORKFLOWS array as a numbered list.
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:42-54 (handler)The handler function for 'list_workflows'. It maps over BUILTIN_WORKFLOWS (imported from ../comfyui/workflows.js), formatting each name as a numbered list item, and returns the result as text content.
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/comfyui/workflows.ts:310-317 (helper)The BUILTIN_WORKFLOWS constant array defines the list of built-in workflow names: 'txt2img', 'img2img', 'upscale', 'controlnet', and 'ip_adapter'. This is the data source for the list_workflows tool.
export const BUILTIN_WORKFLOWS = [ "txt2img", "img2img", "upscale", "controlnet", "ip_adapter", ] as const; export type BuiltinWorkflow = (typeof BUILTIN_WORKFLOWS)[number]; - src/server.ts:45-45 (registration)The registerModelTools function (which registers 'list_workflows') is called during server construction in buildContext().
registerModelTools(s, client); - src/tools/models.ts:41-41 (schema)The schema for 'list_workflows' is an empty object {} — the tool takes no input parameters.
{},