Create a diagram
create_diagramCreates a diagram in a workspace (requires editor access and at least the write permission there; permission is in list_workspaces). workspaceId may be left out when the connection can write to only one workspace. Optionally adds initial content in the same call, one of: ops (same rules as apply_ops; temporary "$" ids are returned in idMap), a Mermaid flowchart (same as compose_diagram: types / layout / direction; returns nodeIds, groupIds and edgeIds), or an infographic spec (same as compose_diagram infographic: returns posterId, nodeIds, blocks, quota and layout; the diagram font is set to the theme’s font). There is no dryRun: every call creates a diagram (compose_diagram dryRun with preview checks a drawing on an existing diagram without writing). The plan’s diagram limit applies (Free: 3 diagrams).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | No | ||
| title | No | ||
| types | No | Maps Mermaid node ids, subgraph ids, classes (":::name" / "class A name") or "@shape" (e.g. "@cylinder") to node types from search_node_types (e.g. {"db":"cloud.database","vpc":"network.vpc"}). A subgraph takes a container type (network.vpc, k8s.namespace, cloud.region, c4.system-boundary…). Unmapped nodes become core.box (non-rectangular Mermaid shapes become core.shape), unmapped subgraphs core.frame. Edges between mindmap.* or org.* nodes become mind-map branches / reporting lines. | |
| layout | No | Layout engine (default layered). | |
| mermaid | No | Mermaid source: a flowchart ("flowchart LR" / "graph TD", subgraphs included), or a pie, xychart, timeline, quadrantChart or venn-beta chart, which is drawn as one infographic block. Other Mermaid diagram kinds are not supported; the error names the Archboard node types to use instead. | |
| direction | No | Flow direction; overrides the Mermaid header. "auto" keeps the header direction unless the drawing gets much wider than tall (or taller than wide), then uses the other one; the result says which. | |
| infographic | No | Infographic spec: theme + blocks; the server measures and lays the blocks out on a 12-column poster. Read read_me topic "infographics". | |
| workspaceId | No | Workspace id from list_workspaces; optional when this connection can write to only one workspace. |