Skip to main content
Glama

Make sequence diagram

make_sequence_diagram
Read-onlyIdempotent

Use this when the user wants a UML sequence diagram drawn, for example "draw a sequence diagram of the login flow" or "make a PDF of these API calls". Takes the diagram text in a line grammar: participant Name / actor Name / participant "Long Name" as Alias; A -> B: text (sync), A ->> B: text (async), A --> B: text (reply), A -> A: text (self); note over A: text / note over A,B: text; alt cond / else cond / end, loop cond / end, opt cond / end; activate A / deactivate A; # comment lines. When the user describes the flow in words, write it in this grammar first. Returns counts, the messages in order, the blocks with their messages, a check on the drawing (messages in order, frames holding their messages, overlapping labels), the PDF page count and smallest text size, an interactive diagram, and PDF, SVG and CSV downloads. Refuses a line outside the grammar with its line number and token. Up to 30 participants and 400 messages. Does not read features of other diagram languages outside this grammar. A diagram too wide for the paper with text of at least 7 pt gets no PDF (SVG and CSV only), and the result says so. Download links of large diagrams expire after about 1 hour.

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": {
      "diagram": "<diagram>"
    },
    "name": "make_sequence_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoTitle printed on the diagram and used in file names, up to 80 characters, e.g. "Login flow".
diagramYesThe diagram in this line grammar, one statement per line, up to 60,000 characters: participant Name | actor Name | participant "Long Name" as Alias; A -> B: text (sync call), A ->> B: text (async), A --> B: text (reply), A -> A: text (self); note over A: text | note over A,B: text; alt condition / else condition / end, loop condition / end, opt condition / end; activate A | deactivate A; lines starting with # or %% are comments. Example: "actor User\nUser -> Web: Log in\nWeb -> DB: Find user\nDB --> Web: User row\nalt password ok\nWeb --> User: Welcome\nelse wrong password\nWeb --> User: Try again\nend".
page_sizeNoPDF paper: letter (default), a4 or tabloid (11 x 17 in). Landscape unless portrait needs fewer pages. Example: a4.

Output Schema

NameRequiredDescriptionDefault
pdfYes
shownNo
titleYes
blocksYes
countsYes
messagesYes
warningsYes
downloadsYes
layout_checkYes
participantsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive, closed-world), it discloses hard limits (30 participants, 400 messages), the exact refusal behavior for grammar violations including line number and token, the degraded case where an over-wide diagram yields no PDF, and download link expiry of about one hour. This is unusually rich failure and constraint disclosure for a rendering tool.

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 the triggering condition and example user phrasings before the grammar block, so an agent can decide quickly. The heavy grammar enumeration largely duplicates the diagram parameter's schema text, which is the main wasted material.

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 generator with limits, failure modes, and a possible missing-PDF case, the description covers everything an agent needs to call it correctly and to explain outcomes to a user. Return values are spelled out even though an output schema exists, which is redundancy but not a gap.

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 100%, so the baseline is 3; the schema already documents title, diagram grammar verbatim, and page_size with its enum and default. The description restates the grammar rather than adding new parameter-level meaning, and it says nothing extra about page_size beyond what the schema provides.

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?

Specific verb and resource ("UML sequence diagram drawn") plus concrete example requests, so the tool's function is unmistakable. It never names the sibling check_sequence, so the boundary between drawing and checking is left to inference even though the description mentions an internal check.

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?

Opens with an explicit trigger ("Use this when the user wants a UML sequence diagram drawn") and adds a real workflow rule: when the user describes the flow in words, write it in the grammar first. Exclusions exist (other diagram languages, size limits) but the alternative tool check_sequence is never named as the route for validation-only needs.

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.

Resources