Skip to main content
Glama

list_workflows

Discover available workflow files in ComfyUI to select and execute saved automation processes for image generation and system management.

Instructions

List available workflow files.

Returns list of workflow JSON files in the configured workflows directory. Use run_workflow() to execute a saved workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'list_workflows' tool. It lists all *.json workflow files in the configured COMFY_WORKFLOWS_DIR directory, handling missing directory errors gracefully.
    @mcp.tool() def list_workflows(ctx: Context = None) -> list: """List available workflow files. Returns list of workflow JSON files in the configured workflows directory. Use run_workflow() to execute a saved workflow. """ if not settings.workflows_dir: return ["Error: COMFY_WORKFLOWS_DIR not configured"] if ctx: ctx.info(f"Listing workflows in: {settings.workflows_dir}") path = Path(settings.workflows_dir) if not path.exists(): return [] return sorted([f.name for f in path.glob("*.json")])
  • The @mcp.tool() decorator registers the list_workflows function as an MCP tool within the register_workflow_tools function.
    @mcp.tool() def list_workflows(ctx: Context = None) -> list: """List available workflow files. Returns list of workflow JSON files in the configured workflows directory. Use run_workflow() to execute a saved workflow. """ if not settings.workflows_dir: return ["Error: COMFY_WORKFLOWS_DIR not configured"] if ctx: ctx.info(f"Listing workflows in: {settings.workflows_dir}") path = Path(settings.workflows_dir) if not path.exists(): return [] return sorted([f.name for f in path.glob("*.json")])
  • Call to register_workflow_tools(mcp) within register_all_tools, which includes the list_workflows tool registration.
    register_workflow_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