Skip to main content
Glama
dgmo-mcp
by diagrammo

render_diagram

Read-onlyIdempotent

Renders DGMO markup to SVG or PNG and returns SVG text or a base64 PNG, including a saved temp file path when PNG is selected.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dgmo": "<dgmo>"
    },
    "name": "render_diagram"
  }
}

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.
highlightNoStory view for this render only: the element names to emphasise. Given, it replaces the diagram's own highlight line; 'none' clears it. Omitted, the diagram's own line is used. Which elements a name matches: get_language_reference.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.29.16
    • addedInput schema / properties / highlight
      Added value: +{
      +  "description": "Story view for this render only: the element names to emphasise. Given, it replaces the diagram's own highlight line; 'none' clears it. Omitted, the diagram's own line is used. Which elements a name matches: get_language_reference.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.29.13
    • addedInput schema / properties / height / maximum
      Added value: +4096
    • addedInput schema / properties / width / maximum
      Added value: +4096
  3. 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."
  4. 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."
  5. 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"
      +}
  6. Addedv0.17.0
  7. Removedv0.12.0
  8. 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)"
  9. Addedv0.2.2
  10. Removedv0.1.21
  11. First observedv0.1.13

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context beyond them: the return shape (SVG text or base64 PNG) and the side effect that png output also writes a temp file and returns its path — a side effect not visible in the annotations.

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 action and outputs, then the png side effect and the syntax pointer. Nothing is redundant and no sentence could be dropped without losing 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?

There is no output schema, but the description compensates by describing the returned value for both formats, including the temp-file path for png. The main remaining gap is the relationship to the sibling preview/validate tools, which is left unstated.

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% and the schema already documents theme, width, height, palette and highlight in rich detail. The description adds only the format=png temp-file behavior and a pointer to get_language_reference for the dgmo value, so 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.

Purpose4/5

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

States a specific verb and resource ('Render DGMO markup to SVG or PNG') and names the output formats, so the agent knows exactly what it produces. It does not differentiate itself from the close sibling 'preview_diagram', leaving the render-vs-preview distinction to inference.

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

Usage Guidelines3/5

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

Gives one concrete routing rule: call get_language_reference for DGMO syntax. It offers no guidance on when to render versus preview_diagram or validate_diagram, or whether validation should precede rendering, so usage is only partially implied.

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