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.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the core functionality (converting diagram code to image file) and mentions the scale option's limitation to SVG format, but lacks details about error handling, performance characteristics, or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with three sentences that each serve distinct purposes: stating the core functionality, explaining use cases, and noting a specific feature. There is no redundant or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, 100% schema coverage, and no output schema, the description provides adequate context about what the tool does and when to use it, but lacks details about return values, error conditions, or performance characteristics that would be helpful for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, so the baseline is 3. The description adds minimal value beyond the schema - it mentions the scale option's effect on SVG output, but doesn't provide additional context about parameter interactions or usage patterns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('download', 'converts', 'saves') and resources ('diagram image', 'local file'), and distinguishes it from the sibling tool 'generate_diagram_url' by emphasizing local file saving rather than URL generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('useful for generating diagrams for presentations, documentation, or other offline use'), but does not explicitly state when not to use it or mention the sibling tool as an alternative for different use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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