Skip to main content
Glama

generate_diagram_url

Convert diagram code (Mermaid, PlantUML, GraphViz, etc.) into shareable URLs for displaying diagrams in browsers or embedding in documents.

Instructions

Generate a URL for a diagram using Kroki.io. This tool takes Mermaid diagram code or other supported diagram formats and returns a URL to the rendered diagram. The URL can be used to display the diagram in web browsers or embedded in documents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesDiagram type (e.g., "mermaid" for Mermaid diagrams, "plantuml" for PlantUML, "graphviz" for GraphViz DOT, "c4plantuml" for C4 architecture diagrams, and many more). See Kroki.io documentation for all supported formats.
contentYesThe diagram content in the specified format. For Mermaid diagrams, this would be the Mermaid syntax code (e.g., "graph TD; A-->B; B-->C;").
outputFormatNoThe format of the output image. Options are: "svg" (vector graphics, default), "png" (raster image), "pdf" (document format), "jpeg" (compressed raster image), or "base64" (base64-encoded SVG for direct embedding in HTML).
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. It discloses that the tool generates URLs (not files) and mentions the external service Kroki.io, which adds useful context. However, it doesn't cover behavioral aspects like rate limits, authentication needs, error handling, or whether the URL is persistent/temporary. The description doesn't contradict annotations (none exist).

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 appropriately sized (three sentences) and front-loaded: the first sentence states the core purpose, the second explains inputs/outputs, and the third describes usage. Every sentence earns its place with no redundant information.

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

Completeness4/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is reasonably complete. It covers the purpose, inputs, outputs, and usage context. However, without annotations or output schema, it could benefit from more behavioral details (e.g., URL characteristics, error cases). The 100% schema coverage helps compensate.

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?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema: it mentions 'Mermaid diagram code or other supported diagram formats' which aligns with the 'type' and 'content' parameters, but doesn't provide additional syntax or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Generate a URL for a diagram using Kroki.io' with specific verbs ('generate', 'takes', 'returns') and resources ('Mermaid diagram code or other supported diagram formats', 'URL to the rendered diagram'). It distinguishes from the sibling tool 'download_diagram' by focusing on URL generation rather than downloading.

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: for generating URLs to display diagrams in web browsers or embed in documents. It implies an alternative (the sibling 'download_diagram' likely downloads the diagram file), but doesn't explicitly state when to choose one over the other or list exclusions.

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