Skip to main content
Glama

Draw a boxes-and-arrows diagram

draw_diagram

Draw node-and-edge diagrams with automatic layered layouts, directional flow, labels, shapes, colors, and optional grouped frames; set keys and relationships while coordinates are handled for you.

Instructions

Draws nodes and the edges between them, laid out automatically in layers (direction TB, LR, BT or RL), with optional dashed group frames. You choose keys, labels, shapes and colors; it picks every coordinate. To change it afterwards use edit_diagram with the same keys.

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>"
    },
    "name": "draw_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoLeft edge on the board (default: to the right of what is already there)
yNoTop edge
fontNo
edgesNo
nodesYes
speedNoHow fast shapes appear, so people can follow along (default normal). instant for big changes nobody needs to watch
groupsNo
replaceNoShapes to delete first (a previous version), so the new one goes in their place. Prefer edit_diagram for changes.
spacingNoGap multiplier, 0.5-3 (default 1)
directionNoTB = top to bottom (default), LR = left to right

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key behavioral trait that the caller supplies only semantic data while 'it picks every coordinate.' It omits other important traits: whether drawing appends to or replaces the current board, whether the board must first be joined, and whether the call streams/animates (only hinted at via the schema's speed parameter).

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

Conciseness5/5

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

Three tight sentences, front-loaded with what the tool produces before the mechanism and the follow-up routing. No filler and no restatement of the title.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter board-mutation tool with no annotations and no output schema, the description covers the core mental model and the edit handoff but not prerequisites (board membership), append-vs-replace behavior, or what the caller sees on failure. Adequate, but leaves meaningful gaps for a tool this rich.

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 60% and 10 parameters exist, so the schema does much of the work. The description adds real meaning for two of them (direction semantics TB/LR/BT/RL, and node ids as durable keys reused by edges and edit_diagram), but leaves replace, speed, spacing, colors, and groups to the schema alone.

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?

States a specific verb and resource ('Draws nodes and the edges between them') plus the defining mechanism ('laid out automatically in layers') and the direction options. It is immediately distinguishable from edit_diagram, which the description explicitly frames as the follow-up tool.

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?

Gives an explicit routing rule: 'To change it afterwards use edit_diagram with the same keys.' It also implies this is the creation entry point, but it does not distinguish itself from draw_mermaid, add_shapes, or update_shapes, which are plausible alternatives for similar intents in the sibling list.

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