Make sequence diagram
make_sequence_diagramUse 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
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Title printed on the diagram and used in file names, up to 80 characters, e.g. "Login flow". | |
| diagram | Yes | The 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_size | No | PDF paper: letter (default), a4 or tabloid (11 x 17 in). Landscape unless portrait needs fewer pages. Example: a4. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| shown | No | ||
| title | Yes | ||
| blocks | Yes | ||
| counts | Yes | ||
| messages | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| layout_check | Yes | ||
| participants | Yes |