Skip to main content
Glama

list_workflows

Discover available ComfyUI workflow files stored on disk to identify templates for AI image generation tasks.

Instructions

List all ComfyUI workflow files that are available on disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_previewNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The asynchronous handler function that executes the list_workflows tool, iterating over workflow files, gathering metadata, optionally including file previews, and returning a structured list.
    async def list_workflows(include_preview: bool = False, context: Context | None = None) -> dict[str, Any]:
        """Return metadata about workflows stored on disk."""
    
        entries = []
        for workflow in workflow_repo.iter_workflows():
            description = workflow_repo.describe(workflow)
            if include_preview:
                preview = await anyio.to_thread.run_sync(
                    workflow.read_text, "utf-8"
                )
                description["preview"] = preview
            entries.append(description)
        entries.sort(key=lambda item: item["relative_path"])
        if context is not None:
            await context.info(f"Found {len(entries)} workflow files")
        return {
            "workflow_root": str(workflow_repo.root),
            "count": len(entries),
            "workflows": entries,
        }
  • Registers the list_workflows tool on the FastMCP server instance, specifying its name and description.
    @server.tool(
        name="list_workflows",
        description="List all ComfyUI workflow files that are available on disk.",
    )
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'available on disk', hinting at a read operation, but does not disclose behavioral traits such as permissions needed, rate limits, error handling, or what 'list' entails (e.g., format, pagination). The description is minimal and lacks critical operational details.

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?

The description is a single, clear sentence with no wasted words. It is front-loaded with the main purpose and efficiently conveys the essential information without unnecessary elaboration.

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

Completeness3/5

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

Given the tool has an output schema, the description does not need to explain return values. However, with no annotations and low schema coverage, it lacks details on behavior and parameters. The description is adequate for a simple list operation but misses context on usage and transparency, making it minimally viable.

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?

Schema description coverage is 0%, so the description must compensate. It does not mention the 'include_preview' parameter at all, but since there is only one optional parameter, the baseline is high. The description focuses on the core action, but fails to explain parameter usage, resulting in a slight deduction from the ideal.

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

Purpose4/5

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

The description clearly states the verb 'list' and the resource 'ComfyUI workflow files', specifying they are 'available on disk'. It distinguishes from 'read_workflow' by indicating listing vs reading content, but does not explicitly differentiate from 'list_models' beyond the resource type.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like 'list_models' or 'read_workflow'. The description implies usage for listing files on disk, but lacks context on prerequisites, exclusions, or comparative scenarios.

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/neutrinotek/ComfyUI_MCP'

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