dgmo-mcp

v0.29.20
io.github.diagrammo/dgmo-mcp Checked 21 hours ago Published 1 day ago

Generate 40+ diagram types from text; render locally to SVG/PNG, open in the Diagrammo editor

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

render_diagram

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.

ParameterTypeDescription
dgmo *stringDGMO diagram markup. For syntax call get_language_reference.
formatstringOutput format
heightintegerCanvas height in px. Most chart types derive height from their content and ignore this; the data charts honour it.
highlightstringStory 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 m…
palettestringColor 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.
themestringColor theme
widthintegerCanvas 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 c…

share_diagram

Generate a shareable diagrammo.app URL for a DGMO diagram. The source is compressed into the URL fragment (after the #), which a browser never sends to a server, so nothing is uploaded and the link works for anyone who opens it; returns the URL as text. Errors when the compressed source exceeds the URL size limit (the error reports both sizes) — split or simplify the diagram, or use open_in_app / render_diagram instead. The source is not validated here; call validate_diagram first.

ParameterTypeDescription
dgmo *stringDGMO diagram markup

open_in_app

Open a DGMO diagram in the Diagrammo desktop app (macOS only). Falls back to browser preview if the app is not installed. Pass `filePath` to open a saved .dgmo file directly — the app opens THAT file, so in-app edits autosave back to it (one editable source of truth, live re-render). This is the preferred path when the app is installed: write the .dgmo source first, then open it here. Omit `filePath` for an ephemeral diagram (sends a deep link; the app creates its own copy).

ParameterTypeDescription
dgmo *stringDGMO diagram markup
filePathstringAbsolute path to an already-saved .dgmo file. When set, the app opens this exact file for live editing instead of receiving a deep-linked copy. Any other value — relative, not .dgmo, or missing —…

check_app_installed

Check whether the Diagrammo desktop app is installed. Returns a sentence naming the output route the product prefers, plus JSON `{ installed, paths, platform }`. Detection is macOS-only; other platforms always report not installed. The answer does not change within a session, so one call is enough before deciding how to show a diagram: when installed, the preferred route is open_in_app with `filePath`; otherwise share_diagram.

list_chart_types

List all supported DGMO chart types with descriptions, grouped by family and, in data and business, by purpose.

get_language_reference

Get the DGMO language reference. With `chart_type`, returns that type's section plus the universal rules every diagram follows (the closed color set, titles, categorize-and-color). Without it, returns the entire reference for all chart types, which is very large (hundreds of KB); pass `chart_type` whenever the type is known. Errors when the type has no documented section — call list_chart_types for the valid ids. suggest_chart_type already appends the chosen type's section, so a call here is only needed after the user picks a type or when switching types.

ParameterTypeDescription
chart_typestringOptional chart type to get reference for (e.g. "sequence", "flowchart", "bar")

preview_diagram

Render one or more DGMO diagrams and open an HTML preview in the browser. Supports theme toggle and optional source display. For DGMO syntax call get_language_reference.

ParameterTypeDescription
diagrams *arrayOne or more diagrams to preview
include_sourcebooleanShow DGMO source in collapsible blocks
palettestringColor palette for the page and every diagram. Given, it beats each diagram's own palette line; omitted, each diagram uses its own, and the page uses slate.
themestringColor theme

generate_report

Generate a polished HTML report with multiple DGMO diagrams, table of contents, and optional source blocks. Opens in browser by default. For DGMO syntax call get_language_reference.

ParameterTypeDescription
sections *arrayReport sections, each with a diagram
title *stringReport title
include_sourcebooleanShow DGMO source in collapsible blocks
openbooleanOpen the report in the browser
palettestringColor palette for the page and every diagram. Given, it beats each diagram's own palette line; omitted, each diagram uses its own, and the page uses slate.
subtitlestringOptional subtitle
themestringColor theme

validate_diagram

Validate DGMO markup without rendering. Returns structured parse errors and warnings. Much faster than render_diagram — use this to check syntax before rendering.

ParameterTypeDescription
dgmo *stringDGMO diagram markup to validate

suggest_chart_type

Suggest the best DGMO chart type for a user's plain-English diagram request. Call this first when creating a new diagram: it ranks the chart types against the request and, on a confident pick, appends that type's language-reference section, so no separate get_language_reference call is needed. It is not needed when editing an existing diagram, whose first line already declares its type. Returns one of two shapes: (1) a confident pick (high/medium) with the top match's syntax, or (2) an '⚠️ ASK THE USER' result when the choice is ambiguous or nothing matched. On an ASK-THE-USER result, pr…

ParameterTypeDescription
prompt *stringUser's plain-English diagram request

get_examples

Get example DGMO diagrams for a chart type. Returns real-world examples from the gallery that demonstrate syntax patterns. Use these as few-shot references when generating new diagrams.

ParameterTypeDescription
chart_typestringChart type to get examples for (e.g. "sequence", "infra", "bar"). Omit to list all available example names.

put_space_diagram

Write a DGMO diagram into a Diagrammo Cloud space, by folder and title: updates the diagram with that title in that folder, or creates it (private) when there is none. Re-sending identical source changes nothing. Returns JSON `{ action: "created" | "updated", id, title, folder, version }`. Needs DGMO_API_KEY (a space API key) in the server environment. Errors name the cause: 401 bad or revoked key, 403 not allowed, 404 no such space or folder, 409 another write landed first (call again). Call validate_diagram first; this does not validate.

ParameterTypeDescription
dgmo *stringDGMO diagram markup
space_id *stringThe space the API key belongs to (the key does not name it). Shown beside the key when it is made at https://online.diagrammo.app/account.
title *stringDiagram title within the folder.
folderstringFolder path from the space root, e.g. "docs/architecture". Omit for the root.

get_space_diagram

Read a diagram from a Diagrammo Cloud space, by `id` or by `title` in `folder`. Titles match case-insensitively. Returns JSON `{ id, title, folder, chartType, version, updatedAt, source }`. Needs DGMO_API_KEY (a space API key) in the server environment. Errors when the key is refused (401/403) or nothing matches (404); list_space_diagrams shows what is there.

ParameterTypeDescription
space_id *stringThe space the API key belongs to (the key does not name it). Shown beside the key when it is made at https://online.diagrammo.app/account.
folderstringFolder path from the space root, e.g. "docs/architecture". Omit for the root.
idstringDiagram id. Takes precedence over title.
titlestringDiagram title, when no id is given.

list_space_diagrams

List every diagram in a Diagrammo Cloud space. Returns JSON `{ diagrams: [{ id, title, folder, chartType, version, updatedAt }] }`, sorted by folder then title. Needs DGMO_API_KEY (a space API key) in the server environment.

ParameterTypeDescription
space_id *stringThe space the API key belongs to (the key does not name it). Shown beside the key when it is made at https://online.diagrammo.app/account.