Skip to main content
Glama
diagrammo
by diagrammo

render_diagram

Read-onlyIdempotent

Convert DGMO diagram markup into SVG or PNG images. Outputs SVG code or base64 PNG, with optional theme, palette, and size controls for 35+ diagram types.

Instructions

Render DGMO markup to SVG or PNG. Returns SVG text or base64 PNG image. When format is "png", also saves the image to a temp file and returns the path. For DGMO syntax call get_language_reference (e.g. color a label with a trailing color name: "Sales red").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dgmoYesDGMO diagram markup. Color a label by appending a lowercase color name as the trailing token (e.g. "Sales red"); capitalize ("Red") to use a color word as literal text.
themeNoColor themelight
widthNoCanvas width in px. Omit to let the diagram size itself from its content. Honoured exactly by the chart types that lay their content out into the canvas (bar, line, pie and the other data charts). A chart that sizes itself from its own nodes — org, sitemap, class, er, infra and the rest of the structured family — cannot go below its content and will return a wider canvas than asked for.
formatNoOutput formatsvg
heightNoCanvas height in px. Most chart types derive height from their content and ignore this; the data charts honour it.
paletteNoColor palette (slate, atlas, blueprint, tidewater, nord, catppuccin, tokyo-night)slate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.29.1
    • addedInput schema / properties / height
      Added value: +{
      +  "description": "Canvas height in px. Most chart types derive height from their content and ignore this; the data charts honour it.",
      +  "exclusiveMinimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / width
      Added value: +{
      +  "description": "Canvas width in px. Omit to let the diagram size itself from its content. Honoured exactly by the chart types that lay their content out into the canvas (bar, line, pie and the other data charts). A chart that sizes itself from its own nodes — org, sitemap, class, er, infra and the rest of the structured family — cannot go below its content and will return a wider canvas than asked for.",
      +  "exclusiveMinimum": 0,
      +  "type": "integer"
      +}
  2. Addedv0.17.0
  3. Removedv0.12.0
  4. Changed2 schema fields changedv0.2.4
    • changedInput schema / properties / palette / default
      Previous value: -"nord"New value: +"slate"
    • changedInput schema / properties / palette / description
      Previous value: -"Color palette (nord, atlas, blueprint, slate, tidewater, solarized, catppuccin, rose-pine, gruvbox, tokyo-night, one-dark, dracula, monokai)"New value: +"Color palette (slate, atlas, blueprint, tidewater, nord, catppuccin, tokyo-night)"
  5. Addedv0.2.2
  6. Removedv0.1.21
  7. First observedv0.1.13

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark the call safe and idempotent; the description adds the notable side effect that PNG rendering writes a temp file and returns its path, plus the format distinction between SVG text and base64 PNG. This is useful behavioral context beyond the annotations, though file cleanup/lifetime is left unspecified.

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?

Three short sentences lead with the purpose, then cover format-specific behavior, then route to the syntax reference. Every sentence earns its place and nothing is redundant given the input schema.

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 render operation with a detailed 100%-coverage schema and clear return-mode description, the definition is nearly complete. The main gaps are the absence of an output schema and no statement about temp-file cleanup or error behavior, but an agent can select and invoke the tool correctly with what is provided.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all six parameters. The description adds value by tying format='png' to the temp-file side effect and by reinforcing the label-coloring syntax, but it does not need to explain the already-detailed width/height/palette semantics.

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

Purpose4/5

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

The description uses an active verb with a concrete resource ('Render DGMO markup') and names both output formats (SVG/PNG). It clearly tells an agent what the tool produces, though it does not contrast itself with preview_diagram or generate_report, so it stops short of full sibling differentiation.

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?

It gives explicit routing to get_language_reference when DGMO syntax help is needed, including a concrete example. It does not state when to prefer render_diagram over preview_diagram, share_diagram, or generate_report, so the when-not guidance is partial.

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