Skip to main content
Glama

Draw a Mermaid diagram

draw_mermaid

Converts Mermaid source into laid-out hand-drawn shapes on a shared whiteboard and returns node IDs so you can edit the diagram later.

Instructions

Draws Mermaid source as hand-drawn shapes, laid out for you. Supports flowchart/graph (shapes, labels, -->, -.->, ==>, -->|label|, &, chains, subgraphs), sequenceDiagram (participants, actors, ->> -->> -x -), notes, loop/alt/opt/par/critical/break blocks, autonumber), mindmap, erDiagram (entities with fields, cardinalities) and classDiagram (members, relationships). Returns ids keyed by node so you can edit_diagram it later.

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": {
      "source": "<source>"
    },
    "name": "draw_mermaid"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoLeft edge on the board (default: to the right of what is already there)
yNoTop edge
speedNoHow fast shapes appear, so people can follow along (default normal). instant for big changes nobody needs to watch
sourceYesMermaid source
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)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose genuinely useful behavior beyond structured fields: automatic layout ('laid out for you') and the return contract ('returns ids keyed by node'), which matters because there is no output schema. It never states that this mutates a shared board, whether existing shapes are preserved or cleared, or permission/concurrency expectations.

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?

Two sentences, front-loaded with the core action and return contract before the parenthetical capability list. The grammar enumeration is long but earns its place by telling the agent which Mermaid constructs will actually render rather than being dropped.

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 6-parameter, no-annotation, no-output-schema tool, the description covers input format breadth, automatic layout, and the return identifiers needed for follow-up edits. The remaining gap is board-state semantics (additive vs destructive, and how replace interacts with existing content), which an agent would want before calling on a shared board.

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 description coverage is 100%, so x, y, speed, spacing and replace are already documented in the schema, including the enum options and the 0.5-3 spacing range; baseline 3 applies. The description adds no syntax or format detail for source or the layout controls beyond what the schema already says.

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 concrete verb and resource ('Draws Mermaid source as hand-drawn shapes') and immediately scopes it by enumerating the exact diagram grammars supported (flowchart, sequenceDiagram, mindmap, erDiagram, classDiagram) with the operators accepted. An agent can tell precisely what input this tool consumes 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.

Usage Guidelines3/5

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

Usage is implied rather than stated: use this when you have Mermaid source. The only routing hint is the trailing 'so you can edit_diagram it later', which nudges toward editing instead of redrawing but is a hand-off, not an explicit when-to-use/when-not rule. Nothing distinguishes this from sibling draw_diagram, which is a plausible wrong choice for the same task.

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