Skip to main content
Glama

A2UI Atomic Catalog

draw_sequence

Read-onlyIdempotent

Draw a sequence diagram (who sends what to whom, in order) in the chat. YOU write it as Mermaid sequenceDiagram text (first line "sequenceDiagram"; "participant S as Server"; arrows A->>B: text for a call and B-->>A: text for a reply). This tool returns a finished diagram that the view draws inline (MCP Apps hosts; elsewhere the text fallback lists the messages). Call it with the Mermaid you wrote and show the result as it is: do not edit, re-encode or re-send the returned block, and do not pass it to render_surface. If it is refused, the message names the line and what to fix; correct the Mermaid and call again. Limits: 8192 bytes, at most 6 actors and 14 messages; longer flows should be split into several diagrams (one per phase). Supported: participant/actor (with "as" aliases), implicit participants, ->>, -->>, -), ->, -->, autonumber, title. activate/deactivate are ignored (not drawn). Not supported: Note, loop/alt/opt/par/critical/rect blocks. Labels are plain text (60 characters), no HTML or links.

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": {
      "mermaid": "<mermaid>"
    },
    "name": "draw_sequence"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoOptional title shown above the diagram (plain text, 80 characters at most). A "title" line in the Mermaid is used when this is absent.
mermaidYesMermaid sequenceDiagram text you wrote, for example: sequenceDiagram\n participant U as User\n participant A as Auth service\n U->>A: Log in\n A-->>U: Token

Output Schema

NameRequiredDescriptionDefault
titleYesDiagram title.
blocksYesOne laid-out sequence block for the view.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "blocks": {
      +      "description": "One laid-out sequence block for the view.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "title": {
      +      "description": "Diagram title.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "title",
      +    "blocks"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover only the safety profile (readOnly/idempotent/non-open-world), while the description supplies the operationally important behavior: the inline-render vs. text-fallback outcome depending on host, refusal messages that name the offending line, and hard limits (8192 bytes, 6 actors, 14 messages). It also discloses silent degradations an agent would otherwise trip over — activate/deactivate ignored, unsupported Note/loop/alt blocks, 60-character plain-text labels.

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?

Front-loaded with purpose, then constraints, then limits — the important information comes first and no sentence is filler. It is a single dense block with many parentheticals, though; bullets for the supported/unsupported lists would scan faster for an agent parsing under load.

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?

An output schema exists and annotations cover safety, so the remaining burden is the authoring contract and failure modes — both are fully covered, including size/actor/message ceilings and what is silently dropped. An agent has everything needed to author valid Mermaid and recover from a refusal without another call.

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

Parameters5/5

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

Schema coverage is already 100%, so the baseline is 3, but the description earns more: it defines what the mermaid string must contain (first line "sequenceDiagram", participant aliases, ->> vs. -->> semantics), enumerates the accepted arrow/participant subset, and states the precedence rule for the title parameter versus an in-Mermaid title line. This is meaning the schema fields do not carry.

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 ("Draw a sequence diagram ... in the chat") and immediately clarifies the division of labor: the caller authors the Mermaid, the tool renders it. It also names the sibling it must not be confused with ("do not pass it to render_surface"), so an agent can route between them without opening either schema.

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?

Explicit about when to use it (author Mermaid text, pass it here), when the output must not be handled ("do not edit, re-encode or re-send the returned block, and do not pass it to render_surface"), and what to do on failure (read the named line, correct the Mermaid, call again). It even gives a fallback strategy for oversized flows: split into one diagram per phase.

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.