dgmo-mcp
v0.29.20Generate 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.
| Parameter | Type | Description |
|---|---|---|
dgmo * | string | DGMO diagram markup. For syntax call get_language_reference. |
format | string | Output format |
height | integer | Canvas height in px. Most chart types derive height from their content and ignore this; the data charts honour it. |
highlight | string | 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 m… |
palette | string | 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. |
theme | string | Color theme |
width | integer | 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 c… |
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).
| Parameter | Type | Description |
|---|---|---|
dgmo * | string | DGMO diagram markup |
filePath | string | Absolute 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.
| Parameter | Type | Description |
|---|---|---|
chart_type | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
diagrams * | array | One or more diagrams to preview |
include_source | boolean | Show DGMO source in collapsible blocks |
palette | string | Color 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. |
theme | string | Color 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.
| Parameter | Type | Description |
|---|---|---|
sections * | array | Report sections, each with a diagram |
title * | string | Report title |
include_source | boolean | Show DGMO source in collapsible blocks |
open | boolean | Open the report in the browser |
palette | string | Color 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. |
subtitle | string | Optional subtitle |
theme | string | Color 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.
| Parameter | Type | Description |
|---|---|---|
dgmo * | string | DGMO 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…
| Parameter | Type | Description |
|---|---|---|
prompt * | string | User'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.
| Parameter | Type | Description |
|---|---|---|
chart_type | string | Chart 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.
| Parameter | Type | Description |
|---|---|---|
dgmo * | string | DGMO diagram markup |
space_id * | string | The 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 * | string | Diagram title within the folder. |
folder | string | Folder 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.
| Parameter | Type | Description |
|---|---|---|
space_id * | string | The 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. |
folder | string | Folder path from the space root, e.g. "docs/architecture". Omit for the root. |
id | string | Diagram id. Takes precedence over title. |
title | string | Diagram 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.
| Parameter | Type | Description |
|---|---|---|
space_id * | string | The 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. |