Render Mermaid as an image
render_diagramTurn Mermaid diagram text into a hosted PNG and SVG image URL (cached on a CDN). Use it when a diagram has to go somewhere that cannot run Mermaid: email, Slack or Teams messages, PDFs, Word/Google Docs, Confluence, WhatsApp, a README. Returns the URLs plus ready-made Markdown and HTML. Free — no AI credits.
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": {
"mermaid": "<mermaid>"
},
"name": "render_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | "aiflowchart" (default) draws it in AI Flowchart's polished board style; "mermaid" gives the classic Mermaid look. Unsupported diagram types fall back to classic automatically. | |
| theme | No | Optional colour theme (default "default"). | |
| mermaid | Yes | Mermaid source, e.g. "flowchart TD\n A[Start] --> B{OK?}" |