Skip to main content
Glama

read_drawio_svg

Reads an existing .drawio.svg file and returns structured JSON with nodes, edges, groups, and layout, so you can inspect diagram components, connections, and styles for editing or rebuilding.

Instructions

Read an existing .drawio.svg file and return its diagram as structured JSON (nodes, edges, groups, layout). To understand the diagram content — e.g. what components exist, how they are connected, and which group they belong to — read the returned JSON directly: nodes[].label: component names; edges[].source / .target / .label: connectivity and protocol; groups[].label / .children: logical boundaries (VNet, resource group, etc.). Visual styles are returned as style_overrides on each element (e.g. nodes[].style_overrides.fill_color, edges[].style_overrides.stroke_color, groups[].style_overrides.font_size). These CSS-equivalent properties (fill_color=background-color, stroke_width=border-width, font_bold=font-weight:bold, opacity=opacity, etc.) enable full round-trip: read style_overrides → pass them back to edit_drawio_svg to preserve or modify styling. Typical workflows: (1) read_drawio_svg → edit_drawio_svg: targeted add/remove/update; node icons and styles are preserved automatically. (2) read_drawio_svg → create_drawio_svg: full rebuild; icons are NOT carried over from the file, specify them via icon_path or icon_data_uri. Node/group IDs are draw.io internal numeric IDs (e.g. "2", "15"). Edge source/target also use these numeric IDs. These IDs are stable across preserve-mode edits; use them in edit_drawio_svg to reference existing elements. Icon data is NOT included in the response (use has_icon flag to see which nodes have icons). Note: layout is automatically recomputed when regenerating.

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": {
      "file_path": "<file_path>"
    },
    "name": "read_drawio_svg"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYesAbsolute path to the .drawio.svg file to read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/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 so thoroughly: it discloses that IDs are draw.io internal numeric IDs stable across preserve-mode edits, that icons are excluded from the response, that styling round-trips via style_overrides, and that layout is recomputed on regeneration. These are non-obvious behavioral traits an agent could not infer from the schema.

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

Conciseness4/5

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

Purpose and return shape are front-loaded in the opening sentence, and the dense middle section earns its space by documenting a return structure that has no output schema. It is somewhat verbose and run-on (multiple clauses plus a parenthetical CSS-mapping list), but nothing is redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

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 compensates by enumerating the JSON fields (nodes[].label, edges[].source/target/label, groups[].children, style_overrides) and their meaning. Combined with the ID-stability and icon-exclusion notes, an agent has everything needed to call this and use the result correctly.

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?

There is one parameter with 100% schema description coverage, so the schema already defines file_path as an absolute path to a .drawio.svg file. The description adds no syntax or validation nuance beyond that, so the baseline 3 applies.

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?

The first sentence names a specific verb and resource ('Read an existing .drawio.svg file') and states exactly what is returned ('structured JSON (nodes, edges, groups, layout)'). It is clearly distinguishable from create_drawio_svg and edit_drawio_svg, which are explicitly framed as downstream consumers of this read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Typical workflows' section spells out both alternatives and the conditions selecting them: read→edit for targeted changes with style/icon preservation, read→create for a full rebuild where icons are NOT carried over. It also warns which data this tool will not give you (icon data, use has_icon) and what to do instead, which is exactly the routing an agent needs.

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