Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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}`,
            },
          ],
        };
      },
    );
  • 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}`,
          },
        ],
      };
    },
  • 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);
  • The schema for 'list_workflows' is an empty object {} — the tool takes no input parameters.
    {},
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description makes clear it's a read-only listing operation, implying safe behavior. Adds context that these are named baseline workflows.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no waste, front-loaded with key action and resource, then sibling differentiation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no parameters, and simple read operation, description fully covers what the tool does and when to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters, schema coverage 100%, but description adds value by specifying the resource type (built-in workflow templates), which is beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'List built-in workflow templates' with specific verb and resource, and distinguishes from sibling tool 'generate_with_workflow' for arbitrary workflows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use (list built-in templates) and when not (for arbitrary workflows, use generate_with_workflow), providing clear alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/miller-joe/comfyui-mcp'

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