Skip to main content
Glama

create_drawio_svg

Generate an editable .drawio.svg diagram from a JSON description, with automatic layout and icon resolution. Use the single file in draw.io or embed it as SVG in Markdown.

Instructions

Generate a .drawio.svg file from a diagram description. The file works in two ways simultaneously: (1) editable in draw.io / VS Code draw.io extension, (2) embeddable as SVG in Markdown design documents with . This single-file format prevents inconsistency between the source diagram and its SVG export. Layout is computed automatically via elkjs — no need to specify coordinates. Icons can be provided as local file paths; if omitted, a fallback icon is searched automatically. Each element supports style_overrides for CSS-equivalent visual customization: nodes[].style_overrides (fill_color=background-color, stroke_color=border-color, stroke_width=border-width, stroke_dashed=border-style:dashed, font_bold=font-weight:bold, font_size=font-size, font_color=color, opacity=opacity, rounded=border-radius, shadow=box-shadow, text_align=text-align, etc.); edges[].style_overrides (stroke_color, stroke_width, stroke_dashed, font_color, font_size, font_bold, opacity, etc.); groups[].style_overrides (fill_color, stroke_color, stroke_width, stroke_dashed, rounded, corner_radius=border-radius%, font_color, font_size, font_bold, opacity, text_align, shadow, etc.).

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": {
      "nodes": "<nodes>",
      "output_path": "<output_path>"
    },
    "name": "create_drawio_svg"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesNoConnections between nodes.
nodesYesList of nodes (components) in the diagram.
groupsNoOptional grouping containers (e.g. network boundaries, system domains).
layoutNoOptional layout configuration.
output_pathYesAbsolute path where the .drawio.svg file should be saved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it explains the single-file format rationale, that layout is computed by elkjs so coordinates must not be supplied, that icons fall back to simple-icons search, and that style_overrides take precedence over highlight/style. The notable undisclosed behavior is what happens if output_path already exists (overwrite or fail) and whether parent directories are created — material for a file-writing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is well front-loaded, but the bulk of the description is a comma-separated enumeration of style_overrides keys per element type that duplicates the schema one-for-one and bloats the definition. Trimming that parenthetical list would lose no information an agent cannot get from the schema.

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?

For a nested 5-parameter creation tool with no annotations and no output schema, the description supplies the essentials: format semantics, automatic layout, icon resolution, and styling precedence. The remaining gap is failure/overwrite semantics at output_path and any indication of what the call returns (path, file contents, node IDs).

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 coverage is 100% and every property, including the nested style_overrides fields, already carries its own CSS-equivalence description. The description's re-listing of style_overrides keys therefore adds little new meaning; the genuinely additive bits are the precedence relation (style_overrides beats highlight) and the icon fallback rule.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

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

"Generate a .drawio.svg file from a diagram description" pairs a specific verb with a specific artifact, and the follow-on sentences define the dual-purpose file format. An agent can distinguish this from read_drawio_svg and edit_drawio_svg because the verb and the 'create new file at output_path' framing are unambiguous.

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?

Usage context is implied rather than stated: the tool creates a new file, so the siblings (read/edit) are presumably for existing files, but the description never says so explicitly nor names them. It does give useful conditional guidance on optional inputs (icons fall back automatically, layout needs no coordinates), which lifts it above a bare 2.

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

Deploy Server

Other Tools