Skip to main content
Glama

create_workflow

Initialize an empty workflow structure in ComfyUI for building custom image generation pipelines. Start by creating this foundation, then add nodes to construct your automation sequence.

Instructions

Create an empty workflow structure.

    Returns an empty dict that you can populate with add_node().
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'create_workflow' MCP tool. It creates and returns an empty workflow dictionary. The @mcp.tool() decorator handles registration and schema inference from the signature and docstring.
    @mcp.tool()
    def create_workflow(ctx: Context = None) -> dict:
        """Create an empty workflow structure.
    
        Returns an empty dict that you can populate with add_node().
        """
        if ctx:
            ctx.info("Creating new workflow")
        return {}
  • The register_all_tools function calls register_workflow_tools(mcp), which defines and registers the create_workflow tool among others.
    def register_all_tools(mcp):
        """Register all tools with the MCP server."""
        register_system_tools(mcp)
        register_discovery_tools(mcp)
        register_workflow_tools(mcp)
        register_execution_tools(mcp)
  • Calls register_all_tools(mcp) to register all tools including create_workflow.
    register_all_tools(mcp)
  • The register_workflow_tools(mcp) function defines the create_workflow handler inside it using @mcp.tool(), performing the actual registration.
    def register_workflow_tools(mcp):
        """Register workflow management tools."""
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates an empty structure and returns an empty dict, which covers the basic operation and output. However, it lacks details on potential side effects, error conditions, or performance considerations, leaving gaps in behavioral context.

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 extremely concise with two sentences that directly state the action and the intended use of the output. Every word serves a purpose, and it's front-loaded with the core functionality, making it efficient and easy to parse.

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 annotations, no output schema), the description is adequate but minimal. It explains what the tool does and hints at usage, but for a creation tool, it could benefit from more context on integration with sibling tools or error handling, though the lack of complexity keeps it from being incomplete.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately focuses on the tool's purpose and output without redundant parameter details, earning a baseline score above 3 due to the absence of parameters.

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 'Create' and the resource 'empty workflow structure', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'load_workflow' or 'get_workflow_template', which also involve workflow initialization or retrieval.

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 mentioning that the result can be populated with 'add_node()', suggesting it's for building workflows from scratch. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'load_workflow' or 'get_workflow_template', nor does it mention any prerequisites or exclusions.

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