drawio MCP Server
OfficialCreates draw.io diagrams from XML, CSV, or Mermaid and opens them in the draw.io editor, plus reads/edits local .drawio files and finds shapes.
open_drawio_xml— open the editor with a hand-crafted XML diagram; supports precise positioning, stencils, containers/swimlanes, layers, dark mode, lightbox; optionalrouting: "libavoid"(reroutes edges around shapes) orpostLayout: "elk"(auto-arranges nodes) — never both.open_drawio_mermaid— open Mermaid.js definitions (flowcharts, sequence, class, state, ER, gantt, mind maps, timelines, C4, 28 types total) as editable draw.io diagrams; optionalpostLayout: "elk"for complex flowcharts (≥20 nodes, ≥3 decisions, back-edges).open_drawio_csv— build org charts, flowcharts and other diagrams from draw.io CSV import format.get_drawio_reference— fetch the generation reference forxml(layers, tags, metadata, tables, cross-functional grids, dark-mode colors) ormermaid(header keywords, syntax hints, styling) — valid for the rest of the conversation.list_pages— list pages (index, id, name, size) in a local.drawio/.xmlfile without loading content.get_page— read one page's raw mxGraphModel XML, decompressing if needed.set_page— replace one page's XML in place, leaving other pages untouched.search_shapes— keyword-search ~10,000 built-in stencils (AWS/Azure/GCP, network, P&ID, electrical, Cisco, Kubernetes, UML, BPMN) plus icon-service logos; returns ready-to-use style strings. Use only for industry-specific or branded icons, not basic flowchart/UML/ERD shapes.Common options —
dark: auto|true|falseandlightbox: truefor read-only viewing on the open tools.
The shape search tool can find Cisco shapes among 10,000+ draw.io library shapes.
Allows self-hosting the MCP App server, which renders draw.io diagrams inline in AI chat interfaces, on Cloudflare Workers.
The primary integration target - a draw.io MCP server that creates, opens, and renders diagrams in the draw.io editor, supporting XML, CSV, and Mermaid formats with various layout and export options.
Provides a draw.io skill as a plugin for GitHub Copilot CLI, generating native .drawio diagram files with optional export to PNG, SVG, PDF, or browser URL.
The shape search tool can find Kubernetes shapes among 10,000+ draw.io library shapes.
Supports creating diagrams in Mermaid.js format in addition to native draw.io XML, which can be opened in the draw.io editor.
Supports exporting diagrams to SVG format with embedded XML so exported files remain editable in draw.io.
The shape search tool can find UML shapes among 10,000+ draw.io library shapes.
The native diagram format supported across all approaches, rendered inline in chat or opened in the draw.io editor.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@drawio MCP ServerCreate a flowchart diagram showing the user login process"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Draw.io MCP Server
The official draw.io MCP (Model Context Protocol) server that enables LLMs to create and open diagrams in the draw.io editor.

▶ Watch the video and set up draw.io in your AI assistant on drawio.com/mcp.
Four Ways to Create Diagrams
This repository offers four approaches for integrating draw.io with AI assistants. Pick the one that fits your setup:
How it works | Renders diagrams inline in chat | Opens diagrams in your browser | Generates | Claude generates draw.io URLs via Python |
Diagram output | Interactive viewer embedded in conversation | draw.io editor in a new tab |
| Clickable link to draw.io |
Requires installation | No (hosted at | Yes (npm package) | One-line plugin install (draw.io Desktop only for PNG/SVG/PDF export) | No — just paste instructions |
Supports XML, CSV, Mermaid | XML and Mermaid | ✅ All three | XML and Mermaid (Mermaid needs draw.io Desktop) | ✅ All three |
Editable in draw.io | Via "Open in draw.io" button | ✅ Directly | ✅ Directly | Via link |
Works with | Claude.ai, ChatGPT, VS Code, Cursor, GitHub Copilot CLI, any MCP Apps host | Claude Desktop, Cursor, OpenCode, any MCP client | Claude Code, Codex CLI, GitHub Copilot, Cursor, Antigravity, OpenCode | Claude.ai (with Projects) |
Best for | Inline previews in chat | Local desktop workflows | Local development workflows | Quick setup, no install needed |
Related MCP server: Draw.io MCP Server
Guides
User guides with tested prompts and examples are in the draw.io documentation, and the setup for each assistant is on drawio.com/mcp:
Write prompts: Mermaid or draw.io XML, speed and models
Diagram types and examples and the gallery of every diagram type
Change and style diagrams: changes by prompt, color themes, styles
The gallery is generated from docs/images/gallery/gallery.json and the editable light and dark SVGs next to it; drawio.com reads them when the site is built.
MCP App Server
The MCP App server renders draw.io diagrams inline in AI chat interfaces using the MCP Apps protocol. Instead of opening a browser tab, diagrams appear directly in the conversation as interactive iframes.
The official hosted endpoint is available at:
https://mcp.draw.io/mcpAdd this URL as a remote MCP server in Claude.ai, ChatGPT, VS Code (GitHub Copilot), Cursor, GitHub Copilot CLI, or any MCP Apps-compatible host — no installation required. On Claude.ai, draw.io is also listed in the connector directory and can be added from there in one click. In Cursor (≥ 2.6), diagrams render inline in the Agent chat (one-click install); on older builds, use the stdio @drawio/mcp tool server instead. In GitHub Copilot CLI, run copilot mcp add --transport http drawio https://mcp.draw.io/mcp; a terminal can't show diagrams inline, so it gets a link that opens each diagram in draw.io.
You can also run the server locally via Node.js or the jgraph/drawio-mcp Docker image, or deploy your own instance to Cloudflare Workers.
Tools:
create_diagram— Renders draw.io XML or Mermaid (28 diagram types) as an interactive diagram inline in chatsearch_shapes— Searches 10,000+ shapes across all draw.io libraries (AWS, Azure, GCP, P&ID, electrical, Cisco, Kubernetes, UML, BPMN, etc.) by keyword, supplemented by the draw.io icon service (brand logos and general-purpose concept icons) when the built-in libraries have no good match. Returns exact style strings that can be used directly in XML. Use this to find the correct shape before callingcreate_diagram.get_drawio_reference— Returns the XML or Mermaid generation reference, which the model reads once per format before its first diagram.
Note: Diagrams appear inline in hosts that support the MCP Apps extension, such as Claude.ai, ChatGPT, VS Code with GitHub Copilot and Cursor. In other hosts, such as GitHub Copilot CLI, the tool still works and answers with a link that opens the diagram in draw.io.
MCP Tool Server
The original MCP server that opens diagrams directly in the draw.io editor. Supports XML, CSV, and Mermaid.js formats with lightbox and dark mode options. Published as @drawio/mcp on npm.
Quick start: npx @drawio/mcp
Setup instructions are available for Claude Desktop, Claude Code, VS Code (GitHub Copilot), Cursor (with one-click install), and OpenCode.
Assistant Plugins (Claude Code, Codex CLI, GitHub Copilot)
The drawio skill packaged as a plugin for AI coding assistants (under plugins/): it generates native .drawio files, with optional export to PNG, SVG, or PDF (with embedded XML so the exported file remains editable in draw.io) — or a browser URL that opens the diagram directly in app.diagrams.net. The Claude Code and Cursor plugins also bundle the hosted MCP App Server, so diagrams show inline where the host supports it; the Codex and Copilot ports need no MCP setup. The same skill ships for four hosts:
Claude Code (full documentation →) — install from this repo's marketplace:
/plugin marketplace add jgraph/drawio-mcp
/plugin install drawio@drawioOr load it directly from a local clone with claude --plugin-dir ./plugins/claude-code.
Codex CLI (full documentation →) — install from the same marketplace repo:
codex plugin marketplace add jgraph/drawio-mcp
codex plugin add drawio@drawioGitHub Copilot CLI (full documentation →) — install from the same marketplace repo:
copilot plugin marketplace add jgraph/drawio-mcp
copilot plugin install drawio@drawioOther Copilot surfaces (VS Code agent mode, the coding agent, code review) load the same skill from a repo's .github/skills/ directory instead — see the plugin README.
Cursor (full documentation →) — the same skill plus the hosted MCP App Server, so diagrams also render inline in Cursor's Agent chat. Install it from the Cursor Marketplace (Customize → drawio → Install), or copy plugins/cursor to ~/.cursor/plugins/local/drawio and reload the window.
Antigravity (full documentation →) — install from the plugin's directory on GitHub:
agy plugin install https://github.com/jgraph/drawio-mcp/tree/main/plugins/antigravityOpenCode needs no plugin at all: it discovers skills in .opencode/skills/ and .claude/skills/ (and their ~/ equivalents), so the Claude Code skill folder works as-is — see OpenCode (no plugin needed) for the one-line install.
By default, the plugin writes a .drawio file and opens it in draw.io. Mention a format in your request to change the output:
png / svg / pdf — exports using the draw.io desktop CLI with
--embed-diagramurl — compresses the XML with Node.js's built-in
zliband opens the result atapp.diagrams.net. No draw.io Desktop needed; the.drawiofile is kept locally as a persistent copy.
Alternative: Project Instructions (No MCP Required)
An alternative approach that works without installing anything. Add instructions to a Claude Project that teach Claude to generate draw.io URLs using Python code execution. No MCP server, no desktop app — just paste and go.
Diagram layouts
Two optional, independent layout passes can run after the AI generates a diagram — one re-arranges the nodes, the other only reroutes the edges. Which are available depends on the approach:
Layout pass | What it does | App Server ( | Tool Server ( | Assistant Plugins | Project Instructions |
ELK auto-layout ( | Re-arranges nodes into a clean layered layout; routes the edges as part of it | ✅ | — | ✅ via draw.io Desktop CLI ( | — |
libavoid routing ( | Keeps node positions; reroutes connectors orthogonally around the shapes | ✅ | ✅ from v1.3.0 | ✅ via draw.io Desktop CLI ( | — |
These apply to draw.io XML diagrams. Mermaid diagrams are auto-laid-out already, so neither pass is needed.
The App Server applies these in the inline viewer after the diagram renders; the Tool Server applies libavoid server-side before opening the draw.io editor; the plugins run them through the locally installed draw.io Desktop CLI.
Pick one, not both: ELK already routes its own edges, so adding libavoid on top is redundant. Use
postLayoutto re-arrange a layout, orroutingto tidy the connectors on a layout you placed deliberately.
Data Residency & Offline Use
If you're deploying in an environment with strict data restrictions, here is exactly where diagram data goes for each approach.
No component sends your diagram to a cloud rasterizer. convert.diagrams.net (or
any cloud export endpoint) is not called anywhere in this repository, and there is no
"local dependency missing → fall back to cloud" path. PNG/SVG/PDF export happens only
in the assistant plugins, which shell out to your locally installed draw.io Desktop CLI
(located via which drawio); if it isn't installed, the .drawio file is kept and
nothing is sent.
Does your diagram leave the machine?
Approach | Diagram leaves the machine? |
MCP App Server — hosted ( | Yes — it is sent to the draw.io server as the MCP request. Self-host instead (below) to keep it local. |
MCP App Server — self-hosted (local Node, the | No — processed by your server and embedded in HTML that renders client-side. |
MCP Tool Server ( | No — carried in the URL |
Assistant Plugins (Claude Code, Codex CLI, GitHub Copilot, Cursor, Antigravity) | No — written locally and exported by your local draw.io Desktop CLI. The Claude Code and Cursor plugins also bundle the hosted App Server: diagrams drawn with it are sent to |
By default the servers do not write diagram content to their logs — only request
metadata (method, session, status, timing). The Cloudflare-hosted App Server logs
response bodies only when run with DEBUG=true.
Reducing external requests
Even when the diagram itself stays local, the rendering loads draw.io's web-app /
viewer code from app.diagrams.net and viewer.diagrams.net by default. These
fetch application code and assets — not your diagram — but they are still outbound
requests. To reduce or remove them:
App Server: build with the
VIEWER_PATHenvironment variable to inline the viewer instead of loading it fromviewer.diagrams.net. Server-side, it makes a version check againstviewer.diagrams.netat startup and daily (no data, 5 s timeout, safe to block), andsearch_shapesqueriesicons.diagrams.netwith the search terms unlessDRAWIO_ICON_SERVICE_URL=off.Tool Server: set the
DRAWIO_BASE_URLenvironment variable to a self-hosted draw.io instance. Its two server-side passes also fetch code fromviewer.diagrams.netonce per draw.io release and cache it per user: the libavoid routing core (routing: "libavoid", also primed at install time) and the drawio-elk bundle (postLayout: "elk", fetched on first use, overridable withDRAWIO_ELK_URL). Not requesting those passes makes no such call; the diagram is never part of one either way.Assistant Plugins: the opt-in
urloutput mode opens the diagram atapp.diagrams.net(hardcoded — noDRAWIO_BASE_URLequivalent). Use the default.drawiooutput or local Desktop export instead if you need to avoid that request.
Your LLM is a separate consideration
The diagram is generated by the LLM. If you use a hosted model, the diagram content is produced in that provider's cloud regardless of where this MCP server runs. End-to-end isolation requires a locally hosted model as well.
Verifying
The only reliable way to confirm a deployment makes no outbound calls is to run it with network egress blocked (or watch the browser's Network tab) and verify it still renders. We recommend this for any strict-isolation deployment.
XML Reference (Single Source of Truth)
The draw.io XML generation reference — covering edge routing, containers, layers, tags, metadata, dark mode, style properties, and XML well-formedness — lives in a single canonical file:
All four approaches above use this file as their single source of truth for LLM prompts:
Approach | How it accesses the reference |
MCP App Server | Reads the file at startup / build time and returns it from the |
MCP Tool Server | Reads the file at startup (from repo or bundled copy via |
Assistant Plugins (Claude Code, Codex CLI, GitHub Copilot) | Fetch the condensed |
Project Instructions | Users copy the condensed |
When updating XML generation guidance, edit shared/xml-reference.md — changes propagate to all consumers automatically. If the change touches a rule that shared/xml-essentials.md summarizes, update that line there too.
Shape Search Index
The search_shapes tool is powered by a pre-built index of all draw.io shapes. The index is generated from the live draw.io client (https://app.diagrams.net/js/app.min.js) by running all sidebar palette initializations in Node.js via jsdom and capturing the shape data.
Icons from the draw.io icon service (icons.diagrams.net — the same grouped icon search the editor sidebar uses) are not part of this index: search_shapes queries the service live when the local index has no strong match for a query, returning the icons as shape=image styles. Set DRAWIO_ICON_SERVICE_URL to a self-hosted service to override the endpoint, or to off to disable icon supplementation.
shape-search/search-index.json is committed to the repository. The Update Shape Search Index GitHub Action regenerates it from the released draw.io client after every draw.io release (drawio-dev dispatches drawio-release when its build has finished) and daily as a fallback, and opens a pull request when the shapes changed. Once merged, the tool server picks it up from the CDN; the hosted app server bundles it, so it needs a deploy.
To regenerate the index manually (e.g. when iterating on the generator itself):
cd shape-search
npm install
npm run generate
# Rebuild the MCP App Server worker to embed the updated index
cd ../mcp-app-server
npm run build:workerThe generator fetches app.min.js directly from the public draw.io web app, so no local checkout of the draw.io source is needed.
Development
# MCP App Server
cd mcp-app-server
npm install
npm start
# MCP Tool Server
cd mcp-tool-server
npm install
npm startRelated Resources
draw.io - Free online diagram editor
draw.io Desktop - Desktop application
@drawio/mcp on npm - This package on npm
drawio-mcp on GitHub - Source code repository
Available Tools
8 toolsget_drawio_referenceAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | Which reference to return: "xml" for open_drawio_xml, "mermaid" for open_drawio_mermaid. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden; it discloses the return type (Markdown) and the lifecycle trait 'A reference stays valid for the rest of the conversation', which prevents redundant re-fetches. It stops short of stating read-only status or the reference's size, but the caching/timing guidance is genuine behavioral value beyond structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the purpose, then segments cleanly per format value with a closing lifecycle note. Dense but every clause (content list, trigger condition, validity) carries information; no wasted sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter lookup tool with no output schema, the description fully explains what is returned (Markdown reference), what each format contains, when to invoke it, and how long it stays valid. Nothing needed to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the enum values are already documented as 'xml'/'mermaid'. The description adds meaning beyond the schema by explaining what each value's content covers and when each is warranted, exceeding the terse schema description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Returns a full draw.io diagram generation reference as Markdown') and immediately distinguishes itself from siblings by naming open_drawio_xml and open_drawio_mermaid as the tools this reference supplements. An agent can tell this is a documentation-lookup tool, not a diagram generator.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit when-to-use conditions per format: 'call it once before the first Mermaid diagram in a conversation' for mermaid, and 'only needed when a diagram uses those' for xml, listing the exact features (layers, tables, grids, etc.) that trigger it. The exclusions are as clear as the inclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pageAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | Which page to read: a zero-based page index (e.g. "0"), the page's exact name, or the page's id as shown by list_pages. | |
| path | Yes | Absolute or relative path to the local file. Must end in .drawio or .xml. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden, and it does disclose a genuine behavioral trait: the page is decompressed first if the file stores it compressed. It also specifies the return format (raw mxGraphModel XML). It omits error behavior (missing page index, unreadable file) and any permission considerations, keeping it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero filler. The what-and-returns statement is front-loaded and the prerequisite follows naturally, with no redundant restatement of the tool name or schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must describe the return value, and it does ('raw mxGraphModel XML'), along with the decompression nuance and the list_pages prerequisite. For a two-parameter read tool this is close to complete; only failure modes are unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters (page, path) are already fully documented in the schema, including the index/name/id options and the .drawio/.xml extension rule. The description adds no syntax or format detail beyond that, which is the correct baseline-3 outcome.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (reads one page/diagram from a local .drawio file) plus the exact return shape (raw mxGraphModel XML). It implicitly narrows scope against whole-file siblings like open_drawio_xml by stressing 'one page', but never names those alternatives, so differentiation is partial.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit prerequisite workflow: 'Use list_pages first to find the index, name, or id of the page you need.' That tells the agent when this tool is callable and what must precede it, though it offers no when-not guidance or comparison to the other open_drawio_* readers.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pagesAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path to the local file. Must end in .drawio or .xml. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose real behavior: it does not load full page content, and it returns index, id, name, and approximate stored size. It stops short of stating failure behavior for bad paths or how 'approximate' size is computed, so it is strong but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences, each earning its place: purpose, return shape, and sequencing guidance. The ordering is front-loaded with the purpose statement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates by enumerating the returned fields (index, id, name, approximate size) plus the lightweight-loading guarantee. For a one-parameter read tool, nothing an agent needs to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single path parameter is fully documented in the schema, so the baseline is 3. The description adds no format or constraint details beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource ('Lists the pages (diagrams) in a local .drawio file') with an explicit scope qualifier ('without loading full page content'). It is clearly distinguishable from siblings get_page/set_page, which it names directly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to call it ('first on large multi-page files') and what it precedes ('before get_page/set_page'), with the rationale ('so only the page you actually need gets loaded into context'). This routes the agent correctly relative to the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_drawio_csvAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| dark | No | Dark mode setting. Default: auto | |
| content | Yes | The CSV content following draw.io's CSV import format. | |
| lightbox | No | Open in lightbox mode (read-only view). Default: false |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states 'Opens the draw.io editor' without disclosing side effects, permissions, rate limits, or whether it is read-only or mutating. The lightbox parameter hints at read-only but is not explained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no wasted words. First sentence states purpose, second adds format context. Front-loaded with primary action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description could elaborate on return behavior or errors. It adequately covers purpose and parameter context but lacks guidance on what the tool returns or how it behaves.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (all 3 parameters have descriptions). The description adds value by referencing 'draw.io's CSV import specification' for the content parameter, providing context beyond the schema. The lightbox and dark parameters are standard.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Opens the draw.io editor with a diagram generated from CSV data', providing a specific verb and resource. It also distinguishes from siblings like open_drawio_xml or open_drawio_mermaid by specifying CSV data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for tabular data via CSV, saying 'allows creating org charts, flowcharts, and other diagrams from tabular data'. This gives context but does not explicitly mention when to use or avoid compared to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_drawio_mermaidAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| dark | No | Dark mode setting. Default: auto | |
| content | Yes | The Mermaid.js diagram definition. Example: 'graph TD; A-->B; B-->C;' | |
| lightbox | No | Open in lightbox mode (read-only view). Default: false | |
| postLayout | No | Optional ELK layered layout for Mermaid FLOWCHARTS. The only value is "elk". draw.io's native Mermaid parser does its own layout, but it produces cramped or unbalanced output once the diagram has any structural complexity — request "elk" whenever ANY of these holds: >= ~20 nodes, OR >= 3 decision diamonds (`{...}` shapes), OR any feedback/back-edges (an edge pointing back to an earlier node, e.g. an error path looping to a retry), OR >= 3 distinct endpoints. The flow direction follows the flowchart code (`flowchart TD/TB` vs `LR/RL`), so there is no direction field here. Ignored for non-flowchart diagram types (sequence, class, ER, gantt, …), which lay themselves out. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden and does reasonably well: it discloses that the editor opens with an editable diagram, and warns that a misspelled header keyword yields a blank diagram, which is a real failure mode an agent needs. It does not discuss permissions, side effects on existing pages, or whether the edit persists, leaving some behavioral gaps for a mutation-like tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight paragraphs, front-loaded with the core purpose and supported types, followed by the reference-call prerequisite. Every sentence is load-bearing, though the '28 in all' enumeration is slightly padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 4-parameter tool with 100% schema coverage and no output schema, the description supplies the missing context an agent needs: the supported type list, the get_drawio_reference prerequisite, and the blank-diagram pitfall. Absence of persistence/authorization details is the only meaningful gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 dark, lightbox, and the detailed postLayout heuristics. The description adds only the pointer to get_drawio_reference for header syntax, so per the baseline rule a 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Opens the draw.io editor with a diagram generated from Mermaid.js syntax') and explicitly distinguishes itself from siblings by contrasting the Mermaid input path with the csv/xml alternatives. The enumeration of supported diagram types makes the scope unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly positions itself as 'the recommended default for flowcharts, sequence, class, state and ER diagrams...' and gives an explicit prerequisite ('Call get_drawio_reference with format "mermaid" once before your first Mermaid diagram'). It lacks an explicit when-NOT-to-use statement versus open_drawio_xml or open_drawio_csv, which keeps it short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_drawio_xmlAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| dark | No | Dark mode setting. Default: auto | |
| content | Yes | The draw.io XML content in mxGraphModel format. | |
| routing | No | Optional obstacle-avoiding orthogonal edge-routing pass (libavoid), applied server-side before the diagram opens. The only value is "libavoid". It keeps your vertex positions and only recomputes the connectors so they run in clean right-angle segments that route AROUND the boxes instead of cutting through them (draw.io's default router draws a straight/simple line with no obstacle avoidance). Set it for hand-placed diagrams where edges would otherwise cross shapes — architecture, network, deployment, UML, floor plans. Omit it for sparse layouts where connectors won't overlap anything. Treat `postLayout` and `routing` as alternatives: ELK already routes its own edges, so don't set both. | |
| lightbox | No | Open in lightbox mode (read-only view). Default: false | |
| direction | No | Flow direction for `postLayout: "elk"`: "vertical" (top-down, the default) or "horizontal" (left-to-right). Only meaningful together with `postLayout`. | |
| postLayout | No | Optional full re-layout (ELK layered flow), applied server-side before the diagram opens. The only value is "elk". It PLACES the vertices — your x/y coordinates then only need to express rough direction — and routes the edges as part of the layout. Set it for every directional/hierarchical diagram: flowcharts, process and state diagrams, decision trees, pipelines. Omit it when the layout carries hand-crafted meaning (swimlanes, containers, architecture, UML), which is the usual reason to place cells by hand. Node sizes are kept exactly as you declare them; only positions change (and containers resize around their laid-out children). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the full burden. It discloses that postLayout and routing are applied server-side before the diagram opens, describes their effects in detail (ELK places vertices and routes edges; libavoid keeps vertex positions and recomputes connectors), and warns never to set both. It does not mention authentication or persistence side effects, but given the tool opens an editor with provided content, the behavioral disclosure is strong.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but organized with clear headings and bullet points. Every rule appears necessary for correct XML construction, and purpose/usage are front-loaded. However, some detail might be overwhelming for a tool description and borders on reference material.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complex XML content parameter and six parameters with enums, the description provides comprehensive XML rules, usage routing to siblings (open_drawio_mermaid, search_shapes, get_drawio_reference), and behavioral notes. No output schema is needed since it opens an editor. Complete for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions for parameters like `content` are minimal ('draw.io XML content in mxGraphModel format'), while the description provides extensive XML syntax rules (skeleton, vertex, edge, labels, shapes, containers, lanes, etc.) that define what valid content looks like. It also gives usage context for `postLayout` and `routing` beyond the schema's technical descriptions, adding substantial meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Opens the draw.io editor with a diagram from draw.io XML.' It clearly distinguishes from siblings by saying 'prefer open_drawio_mermaid for flowcharts, sequence, class, ER and the other types Mermaid covers.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use this tool ('custom styling, precise positioning and stencil-based diagrams') and when to use the alternative ('prefer open_drawio_mermaid for...'). Also says when to call search_shapes and get_drawio_reference, and when to use postLayout vs routing (never both).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_shapesAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 10, max: 50) | |
| query | Yes | Space-separated search keywords (e.g. 'pid globe valve', 'aws lambda', 'cisco router', 'kubernetes pod') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses coverage (~10,000 stencils, named domains), the fallback behavior to the icon service when stencils are sparse, and that returned style strings can be pasted directly into mxCell style attributes. It omits any mention of rate limits, ordering, or what an empty result looks like, keeping it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose and return shape, then usage constraints, then the downstream tip about style strings. It is fairly dense but every sentence earns its place; the catalog list of domains is slightly listy but useful for routing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates by describing return fields and their use. Combined with the explicit usage boundaries and the fallback behavior, an agent has everything needed to decide to call it and to use the results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both query and limit are fully documented in the schema (including the default and max for limit). The description adds no syntax or formatting guidance beyond what the schema already provides, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Search the draw.io shape library by keywords') and immediately describes what comes back (style strings, dimensions, titles). It clearly carves out a niche distinct from the sibling reference/page tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says when to use ('ONLY for diagrams that need industry-specific, branded, or pictorial icons') and when not to (flowcharts, UML, ERD, org charts, mind maps, basic-shape requests, or when the user says not to search). It even points to where basic shapes live instead (the XML reference).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_pageAInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | Which page to replace: a zero-based page index (e.g. "0"), the page's exact name, or the page's id as shown by list_pages. | |
| path | Yes | Absolute or relative path to the local file. Must end in .drawio or .xml. | |
| content | Yes | The new page content as plain mxGraphModel XML (uncompressed). Must be a single <mxGraphModel> element without any <diagram> tags. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose the two behaviors that matter most for a destructive write: the blast radius is limited to one page, and compression state is preserved to match the page's original encoding. That is genuine information beyond the schema. It omits failure/error behavior (missing path, file absent, malformed XML) and whether the operation is reversible, which keeps it out of 5 territory.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences, front-loaded with the operation and its scope, followed by the compression guarantee and the discovery prerequisite. Nothing is repeated from annotations or schema descriptions and no sentence is filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a three-required-parameter local file mutation with no output schema, the description covers the essential agent-facing facts: what is changed, what is preserved, and how to locate the target. It does not say whether the call reports success or how errors surface, which is a modest gap rather than a blocking one.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all three parameters are already fully documented, including the accepted identifier forms for 'page' and the 'no <diagram> tags' constraint on 'content'. The description only restates that content is mxGraphModel XML, adding no syntax or edge-case semantics beyond the schema; baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource - replacing the content of exactly one page (diagram) in a local .drawio file - and immediately bounds the scope with 'leaving every other page in the file untouched.' An agent can distinguish this from read-oriented siblings like get_page and list_pages without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use list_pages/get_page first to find the target page' names the prerequisite tools and the intended workflow order, which is exactly the routing knowledge an agent lacks otherwise. It stops short of stating when not to use this tool (e.g. creating a new page vs. editing an existing one), so it falls just below the explicit when/when-not bar.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v0.1.0- First observed
get_drawio_reference - First observed
get_page - First observed
list_pages - First observed
open_drawio_csv - First observed
open_drawio_mermaid - First observed
open_drawio_xml - First observed
search_shapes - First observed
set_page
TDQS
Scored across 8 tools
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.
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.
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.
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
Related MCP Connectors
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Create workflow, sequence, architecture, and mind map diagrams via AI assistants.
Create, edit and organize hand-drawn diagrams (flowcharts, ER, architecture) from any AI agent.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables AI agents to programmatically create, modify, and analyze Draw.io diagrams through the Model Context Protocol. Supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between AI systems and Draw.io.1327 npm1,490MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to create and edit draw.io diagrams programmatically, supporting a wide range of diagram types and styles.142 PyPI5MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables LLMs to create and open diagrams in draw.io using XML, Mermaid, or CSV formats, by building a URL with compressed content and opening it in the browser.327 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, modify, and analyze diagrams using Draw.io (Diagrams.net) through MCP commands.MIT