Skip to main content
Glama

A2UI Atomic Catalog

diagram_studio

Read-onlyIdempotent

Draw a diagram in-chat with the full Diagram Studio interface (MCP Apps hosts only; it opens fullscreen where the host allows it). YOU write the diagram; nothing is generated server-side and nothing is stored. PREFER graph: give vertices (id, label, type start|process|decision|database|cloud|end) and edges (source, target, optional label). The person then gets the whole studio: they can switch the same graph between Mermaid, D2, PlantUML and draw.io, flip its direction, zoom, copy the code, open it in the real draw.io editor with one click, and edit nodes and connections themselves (their edits come back to you). Use syntax with source instead only for diagrams a flow graph cannot express, drawn exactly as written: "mermaid" for sequence, class, state, ER, gantt and mind maps; "d2" for architecture diagrams with containers and nested boxes. Give exactly one of graph or syntax with source. Keep diagrams compact (the input schema states the limits). If the tool or the view reports a problem, fix it and call this tool again. On a host without MCP Apps support the diagram comes back as text.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diagram_studio"
  }
}

Input Schema

NameRequiredDescriptionDefault
graphNoThe diagram as a graph (preferred).
themeNoColours for the draw.io output. Default modern_indigo.
titleNoOptional heading shown above the diagram.
formatNoWhich format the view opens on. Default mermaid; mermaid and d2 draw a picture.
sourceNoOnly with `syntax`: a complete diagram, drawn as written.
syntaxNoOnly with `source`: the language of that source.
directionNoGraph layout direction: TB (top to bottom, default) or LR.

Output Schema

NameRequiredDescriptionDefault
graphNoThe checked graph (graph form): vertices and edges.
themeNoTheme (graph form).
titleYesDiagram title, possibly empty.
formatNoInitial output format (graph form).
sourceNoThe diagram source as given (source form).
syntaxNomermaid or d2 (source form).
directionNoLayout direction (graph form).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "direction": {
      +      "description": "Layout direction (graph form).",
      +      "type": "string"
      +    },
      +    "format": {
      +      "description": "Initial output format (graph form).",
      +      "type": "string"
      +    },
      +    "graph": {
      +      "additionalProperties": true,
      +      "description": "The checked graph (graph form): vertices and edges.",
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "source": {
      +      "description": "The diagram source as given (source form).",
      +      "type": "string"
      +    },
      +    "syntax": {
      +      "description": "mermaid or d2 (source form).",
      +      "type": "string"
      +    },
      +    "theme": {
      +      "description": "Theme (graph form).",
      +      "type": "string"
      +    },
      +    "title": {
      +      "description": "Diagram title, possibly empty.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "title"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The description adds substantial context beyond the annotations: nothing is generated server-side, nothing is stored, fullscreen depends on host support, user edits flow back to the caller, and on a host without MCP Apps support the diagram degrades to text. These are exactly the host-capability and statefulness details annotations cannot express.

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 the preferred mode are front-loaded in the first two sentences, and the format/tool-choice caveats follow. It is dense and long — the middle sentence packs a long feature list — but almost every clause carries actionable information for the caller.

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?

For a seven-parameter tool with nested objects and an output schema, the description covers mode selection, host limitations, edit round-tripping, and error recovery without needing to describe return values. An agent has everything required to call it correctly on the first attempt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains the vertex type vocabulary as shapes, the semantic difference between `graph` and `syntax`+`source`, and the mutual-exclusion rule that the schema does not encode as oneOf. It also points to the schema for size limits rather than restating them.

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

Purpose4/5

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

The description opens with a specific verb and resource ('Draw a diagram in-chat with the full Diagram Studio interface') and explains the rendering modes (Mermaid, D2, PlantUML, draw.io) so an agent can tell it apart from simpler renderers. It never names the close siblings (draw_architecture, draw_sequence, drawio_open), so the differentiation is by capability rather than by explicit comparison.

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

Usage Guidelines4/5

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

It gives clear when-to-use guidance for its own two modes: PREFER `graph` with vertices/edges, and use `syntax` with `source` 'only for diagrams a flow graph cannot express', backed by concrete cases (sequence, class, state, ER, gantt, mind maps, container architectures). It also states the exclusivity rule ('exactly one of `graph` or `syntax` with `source`') and the recovery path on failure. There is no guidance on choosing between this tool and sibling drawing tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.