Make use case diagram
make_use_case_diagramUse this when the user wants a UML use case diagram drawn, for example "draw the use cases of an online shop" or "make a PDF use case diagram of this system". Takes the diagram text in a line grammar: actor Name / actor "Long name" as A; usecase Name / usecase "Text" as UC1; system "Name" { ... } (use cases inside belong to it; not nested); A -- UC1 (association); UC1 ..> UC2 : include; UC3 ..> UC1 : extend; Admin --|> User (actor generalization); note UC1: text; # comments. When the user describes the diagram in words, write it in this grammar first. Returns counts, elements, relations in input order, the diagram check (actors with no use case, use cases no actor reaches, include/extend cycles), a check on the drawing, the PDF page count, an interactive diagram, and PDF, SVG and CSV downloads. Refuses a line outside the grammar, unknown names, relations between the wrong kinds of element and generalization cycles, with the line number and token. Up to 30 actors, 80 use cases, 6 systems and 300 relations. Does not read use case generalization, packages or nested systems. 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_use_case_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. "Online shop". | |
| diagram | Yes | The use case diagram in this line grammar, one statement per line, up to 40,000 characters: actor Name | actor "Long name" as A | usecase Name | usecase "Text" as UC1 | system "Name" { ... } (use case lines inside belong to that system; not nested) | A -- UC1 (association) | UC1 ..> UC2 : include | UC3 ..> UC1 : extend | Admin --|> User (actor generalization) | note UC1: text | # comment. Declare each actor and use case before or after use. Example: "actor Customer\nsystem \"Shop\" {\nusecase \"Place order\" as Order\nusecase Pay\n}\nCustomer -- Order\nOrder ..> Pay : include". | |
| page_size | No | PDF paper: letter (default) or a4. The PDF is portrait, or landscape when the diagram is too wide for portrait. Example: a4. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| shown | No | ||
| title | Yes | ||
| counts | Yes | ||
| analysis | Yes | ||
| elements | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| relations | Yes | ||
| layout_check | Yes |