Skip to main content
Glama
diagrammo
by diagrammo

render_diagram

Read-onlyIdempotent

Convert DGMO markup into SVG or PNG output, returning SVG text or a base64 PNG and saving PNG images to a temporary file path.

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.

Input Schema

NameRequiredDescriptionDefault
dgmoYesDGMO diagram markup. For syntax call get_language_reference.
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). Given, it beats the diagram's own palette line; omitted, the diagram's own palette is used, else slate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.29.13
    • addedInput schema / properties / height / maximum
      Added value: +4096
    • addedInput schema / properties / width / maximum
      Added value: +4096
  2. Changed2 schema fields changedv0.29.10
    • removedInput schema / properties / palette / default
      Removed value: -"slate"
    • changedInput schema / properties / palette / description
      Previous value: -"Color palette (slate, atlas, blueprint, tidewater, nord, catppuccin, tokyo-night)"New value: +"Color palette (slate, atlas, blueprint, tidewater, nord, catppuccin, tokyo-night). Given, it beats the diagram's own palette line; omitted, the diagram's own palette is used, else slate."
  3. Changed1 schema field changedv0.29.5
    • changedInput schema / properties / dgmo / description
      Previous value: -"DGMO 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."New value: +"DGMO diagram markup. For syntax call get_language_reference."
  4. 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"
      +}
  5. Addedv0.17.0
  6. Removedv0.12.0
  7. 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)"
  8. Addedv0.2.2
  9. Removedv0.1.21
  10. First observedv0.1.13

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description does add a genuine side effect the annotations miss: with format=png it writes a temp file and returns its path. It says nothing about size limits (4096 cap) or failure modes, so credit is moderate rather than high.

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?

Four short sentences, front-loaded with the core action and output, then the png caveat, then the syntax escape hatch. Nothing is redundant.

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?

With no output schema, the description carries return-value disclosure and does so adequately (SVG text, base64 PNG, temp path). The remaining gaps — width/height interaction and palette precedence — are already fully documented in the schema's own parameter text.

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 bar is baseline 3. The description goes beyond the schema by explaining what the format parameter actually yields (SVG text vs base64 PNG plus a temp-file path), which the schema only labels "Output format".

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?

States a specific verb and resource (

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?

Explicitly routes the agent to get_language_reference for DGMO syntax and implies usage for producing a final artifact. It gives no guidance about when to prefer preview_diagram over render_diagram, nor any prerequisites beyond the syntax reference.

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