Render Mermaid
diagram_renderConverts Mermaid source into SVG or PNG output, returning a text summary plus an optional PNG image for documentation, reviews, and architecture-as-code workflows.
Instructions
Render a Mermaid diagram to SVG and/or PNG. Returns a text summary plus a PNG image when requested.
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": "diagram_render"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| png | No | Render a PNG screenshot (default true) | |
| theme | No | default | base | dark | forest | neutral | |
| mermaid | Yes | Mermaid source | |
| background | No | CSS background colour, default #ffffff |