{
  "slug": "mermaid-from-data",
  "name": "gizza-ai/mermaid-from-data",
  "version": "0.1.0",
  "title": "Mermaid From Data — Generate Diagrams From Nodes and Edges — gizza.ai",
  "description": "Turn structured node and edge rows into Mermaid flowchart, classDiagram or erDiagram source with labels, shapes and relationship styles.",
  "tags": [
    "mermaid",
    "diagram",
    "flowchart",
    "class diagram",
    "er diagram",
    "nodes",
    "edges",
    "graph",
    "markdown",
    "documentation"
  ],
  "category": "documents",
  "urls": {
    "page": "https://gizza.ai/tools/mermaid-from-data/",
    "markdown": "https://gizza.ai/tools/mermaid-from-data/index.md",
    "descriptor": "https://gizza.ai/tools/mermaid-from-data/tool.json",
    "deep_link_example": "https://gizza.ai/tools/mermaid-from-data/?edges=Start%20-%3E%20Build%20%3A%20implement%0ABuild%20-%3E%20Ship%20%3A%20deploy&nodes=api%20%7C%20API%20service%20%7C%20round%20%7C%20Backend%0Adb%20%7C%20Postgres%20%7C%20cylinder%20%7C%20Backend&diagram=flowchart&direction=TD&row_mode=pair&delimiter=auto&node_shape=rect&edge_style=arrow&title=Release%20pipeline&fence=true"
  },
  "cli": "gizza tool mermaid-from-data \"Start -> Build : implement\nBuild -> Ship : deploy\"",
  "tool": {
    "description": "Generate Mermaid diagram source from structured node and edge data. Paste arrow lines such as `Start -> Build : work`, delimited rows such as `from,to,label,style`, or chain rows such as `Draft,Review,Ship`; optional node declarations can set labels, flowchart shapes, subgraph groups, class members or ER attributes. The tool emits flowchart, classDiagram or erDiagram syntax, supports diagram directions, flowchart edge styles, class/ER relationship styles, optional front-matter title and an optional fenced Markdown block. It validates unknown styles, caps input to 2 MB, 500 nodes and 1000 edges, sanitizes Mermaid identifiers, and returns plain text Mermaid source for local rendering in any Mermaid-compatible editor.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "delimiter": {
          "default": "auto",
          "description": "Delimiter for table-style rows. `auto` detects pipe, tab, then comma; arrow lines such as `A -> B : label` work regardless.",
          "enum": [
            "auto",
            "pipe",
            "comma",
            "tab"
          ],
          "type": "string"
        },
        "diagram": {
          "default": "flowchart",
          "description": "Diagram syntax to emit. `flowchart` creates a Mermaid flowchart, `class` creates a classDiagram, and `er` creates an erDiagram.",
          "enum": [
            "flowchart",
            "class",
            "er"
          ],
          "type": "string"
        },
        "direction": {
          "default": "TD",
          "description": "Diagram direction. TD/TB draw top-to-bottom, LR left-to-right, BT bottom-to-top, and RL right-to-left. ER diagrams render TD as Mermaid direction TB.",
          "enum": [
            "TD",
            "TB",
            "LR",
            "BT",
            "RL"
          ],
          "type": "string"
        },
        "edge_style": {
          "default": "arrow",
          "description": "Default flowchart edge style for rows without a style column. Individual rows can use arrow/open/dotted/thick/bidirectional. Class and ER diagrams interpret the style column as a relationship type.",
          "enum": [
            "arrow",
            "open",
            "dotted",
            "thick",
            "bidirectional"
          ],
          "type": "string"
        },
        "edges": {
          "description": "Edges or paths to turn into Mermaid source. Write one edge per line as `from -> to : label`, `from,to,label,style`, `from|to|label|style`, or use chain mode where every value in a row becomes a node and consecutive values are linked. Blank lines plus # and // comments are ignored. Up to 1000 edges and 2 MB.",
          "type": "string"
        },
        "fence": {
          "default": false,
          "description": "Wrap the Mermaid source in a ```mermaid fenced code block for Markdown paste targets. Default false.",
          "type": "boolean"
        },
        "node_shape": {
          "default": "rect",
          "description": "Default flowchart node shape for discovered nodes. Node declarations can override this per node. Ignored for class and ER diagrams.",
          "enum": [
            "rect",
            "round",
            "stadium",
            "subroutine",
            "cylinder",
            "circle",
            "diamond",
            "hexagon",
            "parallelogram",
            "trapezoid"
          ],
          "type": "string"
        },
        "nodes": {
          "default": "",
          "description": "Optional node declarations, one per line: `id|label|shape|group` for flowcharts, `Class | +field; +method()` for class diagrams, or `ENTITY | string id PK; string name` for ER diagrams. Leave blank to discover nodes from edges.",
          "type": "string"
        },
        "row_mode": {
          "default": "pair",
          "description": "How delimited edge rows are interpreted. `pair` reads from/to plus optional label/style columns. `chain` links every adjacent value in a row, useful for paths like `Draft,Review,Ship`.",
          "enum": [
            "pair",
            "chain"
          ],
          "type": "string"
        },
        "title": {
          "default": "",
          "description": "Optional Mermaid front-matter title placed before the diagram. Leave blank for no title.",
          "type": "string"
        }
      },
      "required": [
        "edges"
      ],
      "type": "object"
    }
  }
}