render_mermaid
ActiveTool of diagrams-mcp
Render a Mermaid diagram definition and return the image with metadata. The definition should be valid Mermaid syntax (e.g. flowchart, sequence, class, ER, state, or Gantt diagram). Returns a list of content blocks: the rendered image plus a JSON text block with metadata including a mermaid.live edit link for opening the diagram in a browser editor. Args: definition: Mermaid diagram definition text. filename: Output filename without extension. format: Output format — ``"png"`` (default), ``"svg"``, or ``"pdf"``. download_link: If True, return a temporary download URL path (/images/{token}) that expires after 15 minutes; if False, return inline image bytes. Defaults to True (URL) — set ``DIAGRAMS_INLINE_DEFAULT=true`` on the server to flip the default. SVG/PDF and PNGs larger than the inline limit always use a download link.
Parameters schema
{
"type": "object",
"required": [
"definition"
],
"properties": {
"format": {
"enum": [
"png",
"svg",
"pdf"
],
"type": "string",
"default": "png"
},
"filename": {
"type": "string",
"default": "diagram"
},
"definition": {
"type": "string"
},
"download_link": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false
}Parent server
diagrams-mcp
https://github.com/ByteOverDev/diagrams-mcp
2/7 registries