Skip to content
Connect an agent
Single tools

get_diagram_syntax

Read the diagram language as data. It is a single tool of the MCP server and the HTTP API, with the title "Get diagram syntax".

TL;DR

QuestionAnswer
What is it?A single tool: it does one thing.
What does it do?Read the diagram language as data.
How do I call it over HTTP?GET /v1/vocabulary
Does it change anything?No. It is read-only and idempotent, and it talks to nothing outside itself. It saves no file and returns its answer as data.
Which bounds apply?None beyond the limits of each argument, which are in the schema below.
Where do I read its schema as data?An MCP client gets the name, description, and JSON Schema of every tool from tools/list.

What it does

Read the diagram language as data. Call it once with no kind before your first diagram: the overview, the tables every kind shares (node types, arrows including dotted ..> for asynchronous calls, animated and numbered lines, icon sets, size limits, how to edit an existing SVG), and one line about each kind. For one kind in full, call it again with kind set to it: its statements, limits, and a tested example. kind flow adds the group types (type=), overlays, stack= marks, and a complete cloud architecture example; build the group tree top-down with type=, one node per service, and icons from map_icons or search_icons. For a common architecture, find_pattern gives a checked diagram to adapt. topic import-formats lists what import_source reads.

Arguments

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.

Result

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.

Behavior hints

HintValue
readOnlyHinttrue
destructiveHintfalse
idempotentHinttrue
openWorldHintfalse

See also

DocWhy
Tool referenceEvery tool, with the workflows first
GET /v1/vocabularyThe same operation over HTTP
Language referenceWhat the diagram source may contain
Writing diagrams with an agentThe loop in practice