mermaid_save
Save rendered Mermaid diagrams to files after previewing and tuning. Export diagrams in SVG, PNG, or PDF formats to specified file paths for documentation and sharing.
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.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
format | No | Output format (default: svg). Must match the format used in mermaid_preview. | svg |
preview_id | Yes | ID of the preview to save. Must match the preview_id used in mermaid_preview. | |
save_path | Yes | Path to save the diagram file (e.g., './docs/diagram.svg') |
Input Schema (JSON Schema)
{
"properties": {
"format": {
"default": "svg",
"description": "Output format (default: svg). Must match the format used in mermaid_preview.",
"enum": [
"png",
"svg",
"pdf"
],
"type": "string"
},
"preview_id": {
"description": "ID of the preview to save. Must match the preview_id used in mermaid_preview.",
"type": "string"
},
"save_path": {
"description": "Path to save the diagram file (e.g., './docs/diagram.svg')",
"type": "string"
}
},
"required": [
"save_path",
"preview_id"
],
"type": "object"
}