download_diagram
Convert diagram code (Mermaid, PlantUML, Graphviz) into image files and save them locally for presentations, documentation, or offline use. Supports SVG, PNG, PDF, and JPEG formats with optional scaling.
Instructions
Download a diagram image to a local file. This tool converts diagram code (such as Mermaid) into an image file and saves it to the specified location. Useful for generating diagrams for presentations, documentation, or other offline use. Includes an option to scale SVG output.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Diagram type (e.g., "mermaid", "plantuml", "graphviz"). Supports the same diagram types as Kroki.io. | |
| content | Yes | The diagram content in the specified format. | |
| outputPath | Yes | The complete file path where the diagram image should be saved (e.g., "/Users/username/Documents/diagram.svg"). | |
| outputFormat | No | Output image format. If unspecified, derived from outputPath extension. Options: "svg", "png", "pdf", "jpeg". | |
| scale | No | Optional scaling factor to apply to the diagram dimensions. Default is 1.0 (no scaling). This currently only affects SVG output format by attempting to modify width/height attributes. |