Skip to main content
Glama

list_templates

Retrieve available workflow templates to streamline ComfyUI automation and simplify workflow management.

Instructions

List available workflow templates.

    Returns list of template names for get_workflow_template().
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the list_templates tool. Decorated with @mcp.tool() for registration. Returns the list of keys from the TEMPLATES dictionary.
    def list_templates(ctx: Context = None) -> list:
        """List available workflow templates.
    
        Returns list of template names for get_workflow_template().
        """
        if ctx:
            ctx.info("Listing templates")
        return list(TEMPLATES.keys())
  • Predefined workflow templates dictionary used by the list_templates tool to list available templates.
    TEMPLATES = {
        "empty": {},
        "fal-flux-dev": {
            "1": {
                "class_type": "RemoteCheckpointLoader_fal",
                "inputs": {"ckpt_name": "fal-ai/flux/dev"},
            },
            "2": {"class_type": "StringInput_fal", "inputs": {"text": "A beautiful landscape"}},
            "3": {"class_type": "IntegerInput_fal", "inputs": {"value": 1024}},
            "4": {"class_type": "IntegerInput_fal", "inputs": {"value": 1024}},
            "5": {"class_type": "IntegerInput_fal", "inputs": {"value": 28}},
            "6": {"class_type": "FloatInput_fal", "inputs": {"value": 3.5}},
            "7": {
                "class_type": "SaveImage_fal",
                "inputs": {"filename_prefix": "flux_output", "images": ["1", 0]},
            },
        },
        "fal-flux-schnell": {
            "1": {
                "class_type": "RemoteCheckpointLoader_fal",
                "inputs": {"ckpt_name": "fal-ai/flux/schnell"},
            },
            "2": {"class_type": "StringInput_fal", "inputs": {"text": "A beautiful landscape"}},
            "3": {
                "class_type": "SaveImage_fal",
                "inputs": {"filename_prefix": "flux_schnell", "images": ["1", 0]},
            },
        },
    }
  • Call to register_workflow_tools within register_all_tools, which registers the list_templates tool among others.
    register_workflow_tools(mcp)
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 of behavioral disclosure. It mentions the return value ('list of template names') but doesn't cover other behavioral aspects such as permissions needed, rate limits, error handling, or whether it's a read-only operation. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 concise and well-structured, consisting of two brief sentences that directly address the tool's purpose and output. There is no wasted language, and the information is front-loaded, making it easy to understand quickly.

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's simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It explains the purpose and output, but lacks details on behavioral traits like error handling or usage context. For a basic list tool, it meets minimum requirements but could be more informative to fully guide an agent.

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?

The tool has 0 parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately focuses on the tool's purpose and output without redundant parameter information, aligning with the baseline expectation for zero-parameter tools.

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 tool's purpose: 'List available workflow templates.' It specifies the verb ('List') and resource ('workflow templates'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'list_workflows' or 'list_nodes', which is why it doesn't score a 5.

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

Usage Guidelines3/5

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

The description implies usage by stating 'Returns list of template names for get_workflow_template()', suggesting this tool is used to retrieve template names for another tool. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'list_workflows' or 'get_workflow_template' directly, leaving some ambiguity.

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/IO-AtelierTech/comfyui-mcp'

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