mermaid_save
Save a rendered Mermaid diagram to a file after previewing and tuning it. Specify the file path, preview ID, and output format (PNG, SVG, or PDF).
Instructions
Save the current live Mermaid diagram to a file path. This copies the already-rendered diagram from the live preview to the specified location. Use this after tuning your diagram with mermaid_preview.
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": {
"save_path": "<save_path>",
"preview_id": "<preview_id>"
},
"name": "mermaid_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save_path | Yes | Path to save the diagram file (e.g., './docs/diagram.svg') | |
| preview_id | Yes | ID of the preview to save. Must match the preview_id used in mermaid_preview. | |
| format | No | Output format (default: svg). Must match the format used in mermaid_preview. | svg |