Skip to main content
Glama

mermaid_to_workflow

Convert a Mermaid flowchart diagram into a ComfyUI workflow JSON. Parses nodes, labeled connections, and widget values to produce an executable API workflow.

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|).
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 disclosing behavior. It explains that the tool resolves node types using ComfyUI schemas and fills missing inputs with defaults, but it lacks details on error handling, unsupported Mermaid features, or performance implications. This is adequate but not comprehensive.

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, consisting of four sentences that each add meaningful information. It is front-loaded with the main purpose and efficiently details the conversion process without unnecessary words.

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?

For a tool with one well-described parameter and no output schema, the description explains the input format, the conversion process, and the output type (valid ComfyUI API workflow). This provides sufficient context for an agent to use the tool correctly.

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 schema describes the single 'mermaid' parameter and its format, achieving 100% coverage. The tool description adds valuable context by specifying that nodes should use ComfyUI class_type names and connections labeled with data types, enhancing the schema's description.

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 diagram into a ComfyUI workflow JSON, specifying it parses nodes, connections with data type labels, and widget values. This is a specific verb+resource combination that distinguishes it from sibling tools like dsl_to_workflow or visualize_workflow.

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?

The description does not provide any explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites, limitations, or when not to use it. Given the many sibling tools, this absence makes it harder for an agent to select the correct tool.

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