diagram_render
Mermaid diagram source (flowchart, sequence, class, state, ER, Gantt, pie, mindmap, …) rendered to SVG or PNG. mermaid.js runs in a sandboxed Chromium page with all network access blocked and securityLevel 'strict' — labels can't inject HTML or scripts. Cost €0.002 per diagram, charged to the API key in Authorization: Bearer. Parameters — code: Mermaid diagram source, up to 20000 chars; format: svg | png (default svg); theme: default | dark | forest | neutral | base (default default); scale: 1 | 2 — PNG pixel density (retina); background: #rrggbb or 'transparent' — PNG canvas behind the diagram (default #ffffff).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "diagram_render"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| scale | No | ||
| theme | No | ||
| format | No | ||
| background | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |