render_mermaid
Converts Mermaid diagram code into local PNG images for visual inspection, so you can spot layout, overlap, and contrast issues and fix them through a render-inspect-render loop.
Instructions
Render Mermaid diagram code to PNG image locally using mmdc. Returns the rendered image for visual inspection. Use this for feedback loops: render -> inspect -> fix -> re-render.
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": {
"mermaidCode": "<mermaidCode>"
},
"name": "render_mermaid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Scale factor for higher resolution (1-5) | |
| theme | No | Mermaid theme | default |
| mermaidCode | Yes | Mermaid diagram code to render | |
| backgroundColor | No | Background color (e.g. 'white', 'transparent', '#F0F0F0') | white |