Skip to main content
Glama
agmonetti
by agmonetti

render_diagram

Convert Mermaid diagram code into a cropped PNG or SVG file, with optional chat preview. Supports sequence, flowchart, class, architecture, and ER diagrams in light or dark themes.

Instructions

Render an isolated Mermaid diagram (sequence, flowchart, class, architecture, ER) directly to a cropped PNG or SVG file with optional visual preview in chat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
themeNoVisual theme: "light" (GitHub Light) or "dark" (GitHub Dark). Default: "light"
formatNoOutput format: "png" (high-res auto-cropped image) or "svg" (vector XML). Default: "png"
diagramYesRaw Mermaid diagram definition code (e.g. "graph TD\nA-->B" or "sequenceDiagram...")
outputDirNoDirectory where exported diagram file will be saved. Default: "./exports"
outputNameNoBase filename for the diagram without extension. Default: "diagram-<timestamp>"
includeBase64NoWhether to include base64 image data in MCP response for direct visual rendering in chat. Default: true

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It reveals that the tool writes an isolated file, crops the output, and can include a base64 visual preview in chat. It could mention overwrite behavior or whether rendering requires external services, but 'isolated' plus direct-to-file and preview details give a useful safety picture.

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?

A single sentence front-loads the action and resource, then efficiently enumerates diagram types, output format, file target, and chat preview. There is no filler or redundant restatement of the tool name.

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?

For a six-parameter tool without an output schema, the description covers the essential workflow: Mermaid input, cropped PNG/SVG file output, and optional visual preview. The schema handles defaults and enums; the description could be more explicit about exactly what the tool returns to the caller, but an agent has enough to invoke it correctly.

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 baseline is 3 and the description is not required to document every parameter. It adds the supported Mermaid diagram types, which the schema does not list, but otherwise mostly paraphrases the format and includeBase64 parameters rather than adding substantial new parameter-level meaning.

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 names a specific verb and resource: render a Mermaid diagram, enumerates supported diagram types, and specifies the output format (cropped PNG/SVG) plus optional chat preview. This clearly distinguishes it from the sibling export_plan, which concerns plans rather than rendering diagram definitions into image files.

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 gives clear context for when to use the tool: converting Mermaid definitions into standalone cropped image files or providing an in-chat visual preview. It does not explicitly state when not to use it or name the sibling as an alternative, but the supported diagram types and output modes make the intended scope clear.

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/agmonetti/plan-export-mcp'

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