Skip to main content
Glama

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
NameRequiredDescriptionDefault
typeYesDiagram type (e.g., "mermaid", "plantuml", "graphviz"). Supports the same diagram types as Kroki.io.
contentYesThe diagram content in the specified format.
outputPathYesThe complete file path where the diagram image should be saved (e.g., "/Users/username/Documents/diagram.svg").
outputFormatNoOutput image format. If unspecified, derived from outputPath extension. Options: "svg", "png", "pdf", "jpeg".
scaleNoOptional 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.
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tkoba1974/mcp-kroki'

If you have feedback or need assistance with the MCP directory API, please join our Discord server