Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DRAWIO_ELK_URLNoWhere the ELK layout bundle for postLayout is loaded from, an http(s) URL or a local path. Default: the CDN.
DRAWIO_BASE_URLNoEditor the diagrams open in, default the public web app. Set it to a self-hosted instance.
DRAWIO_SHAPE_INDEX_URLNoWhere search_shapes loads its shape index from, an http(s) URL or a local path. Default: the CDN.
DRAWIO_ICON_SERVICE_URLNoIcon service that search_shapes queries when the shape index has no strong match. A self-hosted service base URL, or off to disable it.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
open_drawio_xmlA

Opens the draw.io editor with a diagram from draw.io XML. Use it for custom styling, precise positioning and stencil-based diagrams (cloud, network, P&ID, UI mockups, floor plans); prefer open_drawio_mermaid for flowcharts, sequence, class, ER and the other types Mermaid covers.

XML rules:

  • Skeleton: …. Unique ids. No XML comments.

  • Vertex:

  • Edge: . Never self-closing. No waypoints or exitX/entryX.

  • Labels: html=1 in every style; escape HTML in values (<b>Name</b><br>detail); line break <br>, never \n.

  • Shapes: rhombus (decision), ellipse, shape=cylinder3 (database), text.

  • Grid, no layout math: x=col180+40, y=row120+40, one node per cell; 140×60 boxes, 140×80 diamonds.

  • Containers: swimlane;startSize=24; (titled) or group; (invisible); children set parent="" with coordinates relative to it. An edge's parent is the innermost container holding both its ends, else "1".

  • Lanes: swimlane;horizontal=0;startSize=110; at x=0, y=lane150, height 150; nodes inside at x=120+col180, y=45.

  • Edges: orthogonal; entityRelationEdgeStyle for ER; labels 1-3 words; dashed=1 for one meaning, with a legend.

  • Cloud/network/P&ID icons or logos: call search_shapes, use its style.

  • Set postLayout "elk" for flowcharts, process and tree diagrams (ELK places nodes and routes edges), or routing "libavoid" for hand-placed layouts whose edges would cross shapes. Never both.

Only when the diagram needs layers, tags, metadata and placeholders, tables, cross-functional grids or dark-mode colors, call get_drawio_reference with format "xml" for the full reference.

open_drawio_csvA

Opens the draw.io editor with a diagram generated from CSV data. The CSV format should follow draw.io's CSV import specification which allows creating org charts, flowcharts, and other diagrams from tabular data.

open_drawio_mermaidA

Opens the draw.io editor with a diagram generated from Mermaid.js syntax, converted into an editable draw.io diagram. The recommended default for flowcharts, sequence, class, state and ER diagrams, gantt charts, mind maps, timelines, C4, architecture and the other types draw.io's Mermaid parser supports (28 in all).

Call get_drawio_reference with format "mermaid" once before your first Mermaid diagram in a conversation: it lists the header keyword and syntax hints for every supported type (a misspelled header yields a blank diagram) and flowchart styling.

get_drawio_referenceA

Returns a full draw.io diagram generation reference as Markdown. Format "mermaid": the header keyword and syntax hints for every Mermaid type draw.io supports, flowchart styling and the ELK layout; call it once before the first Mermaid diagram in a conversation. Format "xml": everything beyond the rules in the open_drawio_xml description (layers, tags, metadata and placeholders, tables, cross-functional grids, dark-mode colors, more styles and examples); only needed when a diagram uses those. A reference stays valid for the rest of the conversation.

list_pagesA

Lists the pages (diagrams) in a local .drawio file without loading full page content. Returns each page's index, id, name, and approximate stored size in bytes. Call this first on large multi-page files before get_page/set_page, so only the page you actually need gets loaded into context.

get_pageA

Reads one page (diagram) from a local .drawio file and returns its raw mxGraphModel XML, decompressing it first if the file stores that page compressed. Use list_pages first to find the index, name, or id of the page you need.

set_pageA

Replaces the content of one page (diagram) in a local .drawio file with new mxGraphModel XML, leaving every other page in the file untouched. Compression of the replaced page matches whatever that page's original compression state was. Use list_pages/get_page first to find the target page.

search_shapesA

Search the draw.io shape library by keywords. Returns matching shapes with their exact style strings, dimensions, and titles. Covers ~10,000 built-in stencils (cloud architecture, network topology, P&ID, electrical, Cisco, Kubernetes, BPMN) and, when those are sparse, supplements results with the draw.io icon service (brand/product logos and general-purpose concept icons, e.g. 'react', 'slack', 'shopping cart', 'solar panel'). Use ONLY for diagrams that need industry-specific, branded, or pictorial icons. Do NOT use for standard diagram types like flowcharts, UML, ERD, org charts, or mind maps — these use basic geometric shapes (rectangles, diamonds, circles, cylinders) that are already covered in the XML reference. Also skip if the user asks to use basic/simple shapes or says not to search. The style string from the results can be used directly in mxCell style attributes.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 8 tools

Disambiguation4/5

The three open_drawio_* tools share the 'open editor with a diagram' purpose and differ only by input format (CSV/XML/Mermaid), which could cause misselection. However, the descriptions explicitly cross-reference each other ('prefer open_drawio_mermaid for flowcharts', 'do NOT use search_shapes for standard diagrams'), so boundaries are well signposted. The file tools (list_pages/get_page/set_page/reference/search_shapes) are each clearly distinct.

Naming Consistency4/5

Almost everything follows a clean verb_noun snake_case pattern: list_pages, get_page, set_page, search_shapes, get_drawio_reference. The open_drawio_csv/xml/mermaid trio inserts the product name mid-name, a minor deviation, but consistent with each other and readable.

Tool Count5/5

Eight tools is well-scoped for a draw.io diagram server: three generation entry points, two file-page operations, a page lister, a reference doc, and a shape search. Each tool has a clear reason to exist with no redundancy.

Completeness4/5

Covers diagram creation (CSV/XML/Mermaid), reading and writing existing .drawio pages, shape lookup, and a reference. Gaps exist around lifecycle: no way to create a new .drawio file, add or delete a page, or list local files, forcing workarounds via set_page. Core workflows are otherwise covered.

Maintenance

ActivityActive
ResponsivenessUnresponsive