Skip to main content
Glama

mermaid_to_workflow

Convert a Mermaid flowchart diagram into an executable ComfyUI workflow JSON. Parses nodes, connections with data type labels, and widget values using ComfyUI's object_info schemas.

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?

Discloses parsing, resolution using /object_info schemas, filling defaults, and returning executable workflow. However, it lacks information on error handling, unsupported Mermaid features, or validation, which is notable without annotations.

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?

Three sentences, front-loaded with primary purpose, no unnecessary words. Each sentence adds essential information about the conversion process.

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?

For a single-parameter tool with no output schema, the description covers input format, processing steps, and output. It could mention supported Mermaid syntax details or limitations, but overall adequate.

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 description adds significant meaning beyond the schema's explanation: it specifies Mermaid flowchart text, optional code fences, node labels with class_type names, and connection labels with data types. With 100% schema coverage, this is valuable context.

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 explicitly states the tool converts Mermaid flowchart diagrams to ComfyUI workflow JSON, specifying input format and output. It distinguishes from sibling tools like workflow_to_dsl and 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 Guidelines4/5

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

Describes the use case clearly: converting Mermaid text to a ComfyUI workflow. It details parsing steps but doesn't explicitly state when not to use or provide alternatives, though sibling context implies differentiation.

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

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