Skip to content
Connect an agent
Vocabulary

Get diagram syntax

Get the diagram language reference.

GET/v1/vocabulary

TL;DR

QuestionAnswer
What does it do?Get the diagram language reference.
Which tool does the same?get_diagram_syntax
What does it take?kind, topic in the query string.
What does it return?Status 200 with a body of type SyntaxResponse.
What can go wrong?400 the query failed schema validation; 401 the api key is missing or not valid; 403 the account is on the free plan, which does not include the rest drawing and checking routes (plan.rest_not_included); 429 too many requests. Every failure uses the one error envelope.

What it does

With no kind, the overview: the tables every kind shares (node types with default icons and tones, arrows, line options, icon sets, limits, how to edit a picture) and one line about each kind. With a kind, that kind in full: its statements, limits, and one tested example, and the tables that apply to it. Built from the constants the parser uses, so it cannot drift.

Query parameters

FieldTypeRequiredDescription
kind"flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane"noThe one kind to read in full. Omit it for the overview: the language every kind shares and one line about each kind.
topic"import-formats"noimport-formats: what import_source reads, draws, and takes, a line each.

Responses

StatusMeaningBody
200The language reference.SyntaxResponse
400The query failed schema validation.ErrorResponse
401The API key is missing or not valid.ErrorResponse
403The account is on the Free plan, which does not include the REST drawing and checking routes (plan.rest_not_included).ErrorResponse
429Too many requests.ErrorResponse

Response body

A 200 answer has the type SyntaxResponse.

FieldTypeRequiredDescription
answerstringyesWhat this answer is: overview, a topic (import-formats), or the kind it describes in full (flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, or swimlane today; later versions add kinds, so expect others).
howToGetAKindstringyesIn plain words: what this answer holds and how to get the rest.
kindsstring[]yesHeader keywords: the first line names the kind.
kindDetailsobject[]yesThe overview lists every kind in the order of kinds, with its header, noun, and summary, and a pointer in more. A kind answer holds that kind alone, in full.
kindDetails[].kindstringyesA diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, or swimlane today. Later versions add kinds, so expect others.
kindDetails[].headerstringyesThe header line, such as flow "Title".
kindDetails[].nounstringyesWhat the kind's diagrams are called in a sentence, such as flow or database schema.
kindDetails[].summarystringyesOne sentence: what the kind draws.
kindDetails[].statementsobject[]noThe statements the kind adds to the header. Empty for a kind whose language the shared tables of this reference already describe.
kindDetails[].statements[].syntaxstringyesThe statement with its parts named, such as: task "Name" days=.
kindDetails[].statements[].meaningstringyesWhat the statement does, and what it needs.
kindDetails[].statements[].examplestringyesOne line that parses.
kindDetails[].limitsobject[]noThe quality thresholds the kind adds. Empty for a kind whose limits are in the limits table of this reference.
kindDetails[].limits[].namestringyesWhat is counted, such as tasks.
kindDetails[].limits[].valueintegeryesMore than this in one diagram draws a quality warning.
kindDetails[].limits[].meaningstringyesWhy the limit exists and what to do past it.
kindDetails[].morestringnoOnly in the overview, where statements and limits are left out: what a call with this kind returns that the overview does not, and how to ask for it.
nodeTypesobject[]no
nodeTypes[].type"person" | "agent" | "client" | "service" | "gateway" | "function" | "database" | "cache" | "queue" | "storage" | "identity" | "secret" | "external" | "step" | "decision" | "terminal"yes
nodeTypes[].shape"card" | "pill"yesHow the node is drawn.
nodeTypes[].isTintedbooleanyesTrue when the card is filled and outlined in its tone, as for decisions.
nodeTypes[].defaultTone"neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red"yesColor family used when tone= is not set.
nodeTypes[].defaultIconstring | nullyesIcon used when icon= is not set, or null for none.
nodeTypes[].isDashedbooleanyesTrue when the outline is dashed, as for external systems.
nodeTypes[].usableAsActorbooleanyesTrue when a sequence diagram actor may use this type.
tones("neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red")[]no
directions("auto" | "right" | "down" | "left" | "up")[]noValues for direction= on a flow header.
arrowsobject[]no
arrows[].tokenstringyesThe arrow as written in source.
arrows[].line"solid" | "dashed" | "dotted"yesHow the line is drawn.
arrows[].heads"end" | "both" | "none"yesWhich ends carry an arrowhead.
arrows[].meaningstringyesWhat the arrow says, so the right one is chosen.
blockTypes("alt" | "opt" | "loop" | "par")[]noFrames a sequence diagram can wrap around messages.
columnFlags("pk" | "fk" | "unique" | "nullable")[]noFlags a schema column row may carry.
themes("light" | "dark")[]no
iconSets("lucide" | "simple" | "status" | "aws" | "gcp" | "azure" | "alibaba" | "oci" | "ibm" | "cloudflare" | "digitalocean" | "vercel")[]no
iconCountintegernoNumber of bundled icons; use search_icons to find names.
iconProvidersobject[]noCloud and platform providers, each an icon set holding the provider (set:cloud) and its products.
iconProviders[].set"aws" | "gcp" | "azure" | "alibaba" | "oci" | "ibm" | "cloudflare" | "digitalocean" | "vercel"yesIcon set prefix, as in aws:lambda.
iconProviders[].titlestringyesThe provider the set stands for.
iconProviders[].iconCountintegeryesIcons in the set: the provider itself (set:cloud) and its products.
iconProviders[].examplestringyesOne icon of the set that is bundled, for example aws:lambda.
overlayobjectnoA dashed frame around members that may sit in different groups; it owns none of them.
overlay.optionsstring[]yesOptions an overlay statement takes after its name, as in: overlay id "Name" members=a,b type=scale-group.
overlay.frame"solid" | "dashed" | "dotted"yesHow an overlay is always drawn.
overlay.meaningstringyesWhat an overlay is for, so it is used where a group would be wrong.
groupobjectnoHow a flow group looks and what it accepts; its corner tab shows its icon and name.
group.optionsstring[]yesOptions a group statement takes after its name, as in: group id "Name" type=region provider=aws {.
group.defaultTone"neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red"yesColor family of a group with no type when tone= is not set.
group.exampleobjectyesA complete architecture diagram: typed groups nested by provider, a provider icon on every node, stack marks, and a dotted edge. Copy and edit it.
group.example.kindstringyesA diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, or swimlane today. Later versions add kinds, so expect others.
group.example.titlestringyes
group.example.sourcestringyesA complete diagram that is checked by the build; copy and edit it.
group.typesobject[]yesEvery group type. A type gives the group a default icon, tone, frame style, and a shade that deepens with nesting; icon= and tone= override them.
group.types[].type"cloud" | "account" | "region" | "zone" | "network" | "subnet" | "public-subnet" | "private-subnet" | "management-subnet" | "isolated-subnet" | "resource-group" | "cluster" | "scale-group" | "service-plan" | "web-tier" | "app-tier" | "data-tier" | "storage-account" | "messaging" | "edge" | "security" | "identity-boundary" | "trust-boundary" | "observability" | "ci-cd" | "environment" | "cloud-boundary" | "on-premises" | "client-side" | "external-systems"yesValue for type= on a group.
group.types[].titlestringyesWhat the frame is called in the text description.
group.types[].meaningstringyesWhat the author means by this type, so the right one is chosen.
group.types[].tone"neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red"yesColor family the frame and tab get when tone= is not set.
group.types[].frame"solid" | "dashed" | "dotted"yesHow the outline is drawn.
group.types[].iconstringyesIcon in the corner tab when the group has no provider.
group.types[].providerIconsobjectyesIcon in the corner tab for each provider whose icon differs from the generic one, keyed by provider set.
lineOptionsobject[]noOptions that animate a line (animate=on makes dashes travel toward the arrowhead) or number the steps of a flow or sequence (numbered=on, start=, and step= on a line). All are off by default.
lineOptions[].keystringyesThe option as written, such as animate or step.
lineOptions[].scope"header" | "line"yesheader: on the flow or sequence header line. line: on an edge or a message.
lineOptions[].valuesstringyesWhat the option takes.
lineOptions[].meaningstringyesWhat it does, and the cases where it is refused.
lineOptions[].examplestringyesOne line that parses.
labelIconsobject[]noEdge labels that get a tick or cross automatically; icon=none on the edge removes it.
labelIcons[].labelstringyesAn edge label that gets an icon automatically, matched whole and ignoring case.
labelIcons[].iconstringyesThe icon the label gets.
verbIconsobject[]noThe icons a flow edge label draws when it names a relationship with a verb. icon= on the edge wins, icon=none removes it, and icons=off on the header turns them all off.
verbIcons[].iconstringyesThe icon drawn in the label.
verbIcons[].wordsstring[]yesPhrases that draw it: the whole label, or its first words followed by what is acted on ("reads orders").
stylestring[]noHow to make a flow diagram look finished: verbs on arrows, role= on lines that mean something, typed groups, product names.
autoIconsobjectnoItems with no icon= get the icon their label names for certain (a brand, a cloud product, a common role). icon=none keeps one item plain; icons=off on the header keeps them all plain.
autoIcons.keystringyesThe header option: icons.
autoIcons.valuesstringyesWhat it takes.
autoIcons.meaningstringyesWhat it does, and how one item opts out.
autoIcons.examplestringyesOne header line that parses.
roleIconsobject[]noThe plain icons for common roles, drawn on flow and sequence service and external items, C4 elements, layers blocks, mind map topics, and swimlane lanes. The last role word of the label wins.
roleIcons[].iconstringyesThe icon drawn.
roleIcons[].wordsstring[]yesWhole words of a label of three words or fewer that draw it.
statusIconsobject[]noColored status and outcome icons: a green check, a red X, and so on.
statusIcons[].refstringyesValue for icon=, such as status:success.
statusIcons[].tone"neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red"yesColor the icon is always drawn in, whatever tone its owner has.
statusIcons[].meaningstringyesWhat the icon says, so the right one is chosen.
limitsobjectnoBounds and quality thresholds.
limits.maxSourceLengthintegeryes
limits.maxFlowNodesintegeryesQuality lint: more nodes than this warns, for a diagram with no groups.
limits.nodesPerGroupintegeryesEach group of a flow diagram raises the node limit by this many.
limits.maxFlowNodesCeilingintegeryesThe node limit never rises above this, whatever the groups.
limits.maxSchemaTablesintegeryes
limits.maxSequenceActorsintegeryes
limits.maxNumberedStepsintegeryesMore numbered steps than this in one diagram warns (W200).
limits.maxStackMarksintegeryesMost technology marks a node carries in stack=.
limits.targetWidthintegeryesColumn width in px that diagrams are checked against.
editingobjectnoHow to edit an existing Plotwork SVG: read it back with read_diagram, change the source, draw it, and save or publish it again.
editing.stepsstring[]yesIn order: how to change a diagram that already exists as a Plotwork SVG, a hosted link or a file in the repository.
editing.embedSourcestringyesWhen to set embedSource true on draw_diagram, render_diagram, or publish_diagram, and what it means for who can read the source.
diagnosticCodesobject[]no
diagnosticCodes[].namestringyesIdentifier of the code.
diagnosticCodes[].codestringyesThe code to branch on, such as E120.
diagnosticCodes[].severity"error" | "warning"yes
examplesobject[]yesTested examples: the overview holds the ones for the kinds the shared tables describe in full, a kind answer holds its own.
examples[].kindstringyesA diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, or swimlane today. Later versions add kinds, so expect others.
examples[].titlestringyes
examples[].sourcestringyesA complete diagram that is checked by the build; copy and edit it.
importFormatsobject[]noOnly for topic import-formats: every format import_source reads, a line each.
importFormats[].formatstringyesThe format, as import_source takes it.
importFormats[].readsstringyesWhat it reads.
importFormats[].drawsstringyesThe diagram it draws.
importFormats[].optionsstringyesThe options it takes.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
get_diagram_syntaxThe same operation as an MCP tool
Tool referenceThe operations as callable tools