Render diagram
render_diagramRenders Mermaid or Graphviz DOT diagrams into self-contained HTML pages with raw source files, returning absolute output paths.
Instructions
Write a self-contained, shareable HTML page (renders via CDN: Mermaid, or Viz for Graphviz DOT) plus the raw source file (.mermaid or .dot). Returns the absolute paths written.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>",
"outPath": "<outPath>"
},
"name": "render_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Notation of `source` (default 'mermaid') | |
| source | Yes | Diagram source to render (Mermaid, or DOT when format is 'dot') | |
| outPath | Yes | Output path (with or without extension); .html and the raw source siblings are written |