Skip to main content
Glama

mermaid_to_workflow

Convert a Mermaid flowchart diagram into an executable ComfyUI workflow JSON by parsing node definitions, connections, and widget values.

Instructions

Convert a Mermaid flowchart diagram back into a ComfyUI workflow JSON. Parses node definitions, connections (with data type labels), and widget values from the mermaid syntax. Resolves node types and wires connections using ComfyUI's /object_info schemas. Fills missing inputs with defaults. Returns a valid, executable ComfyUI API workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mermaidYesMermaid flowchart text (with or without ```mermaid code fence). Nodes should use ComfyUI class_type names as labels. Connections should be labeled with data types (e.g., -->|MODEL|).
Behavior4/5

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

With no annotations, the description provides good behavioral context: it uses ComfyUI's /object_info schemas, fills missing inputs with defaults, and returns an executable workflow. However, it doesn't mention error handling or potential limitations for complex Mermaid syntax.

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 two sentences, front-loaded with the core purpose, and every sentence adds meaningful detail. No wasted words, and it efficiently conveys the tool's functionality.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, no output schema), the description is mostly complete, covering input format, processing steps, and output. It lacks mention of edge cases like invalid Mermaid or unsupported syntax, but overall sufficiently contextual.

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

Parameters5/5

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

The single parameter 'mermaid' has full schema coverage. The description adds value beyond the schema by detailing what is parsed (nodes, connections, widget values) and specifying requirements like data type labels, enriching the semantic understanding.

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?

The description clearly states the tool converts a Mermaid flowchart into a ComfyUI workflow JSON, specifying it parses node definitions, connections with data type labels, and widget values. It distinguishes itself from siblings like 'dsl_to_workflow' by focusing on Mermaid syntax.

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 for Mermaid conversion but lacks explicit guidance on when to use versus alternatives (e.g., 'dsl_to_workflow') or exclusions. No context is given about input validation or when not to use.

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

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