Draw a diagram from Mermaid or an infographic spec
compose_diagramDraws into an existing diagram as one agent change (revert_change can revert it): either a Mermaid flowchart (subgraphs become frames, or containers such as network.vpc when you map their ids; map ids, classes or "@shape" to node types with types; unmapped nodes become core.box; options layout, direction ("auto" picks the readable one), frame), or an infographic spec (infographic: theme + blocks; each block is { block, …the node type’s props }, e.g. header, kpi-row, chart, progress, funnel, timeline, process, icon-grid, versus, source) that the server measures and lays out on a 12-column poster — the spec gives data and order, not coordinates. Pie, xychart, timeline, quadrantChart and venn Mermaid diagrams become infographic blocks. It takes exactly one of mermaid and infographic. dryRun checks without writing; with dryRun, preview "light" or "dark" also returns a PNG (a poster exactly as export_diagram draws it). read_me topic "infographics" describes the blocks. Returns applied, seq, batchId, effects, bounds and warnings; Mermaid adds nodeIds, groupIds, edgeIds ("A->B" → edge id) and frameId plus the direction used, an infographic adds idMap, posterId, nodeIds, blocks (node ids and bounds), quota and layout, and each infographic warning’s fix says which span, field or poster size to change. status (≤ 80 characters) is shown to people next to your cursor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | { title } wraps a Mermaid drawing in a new frame; { id } puts the drawing or the poster inside an existing container (frame, namespace, VPC…) below its children and grows the container if needed. | |
| 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. | |
| dryRun | No | Check the drawing against the current state without writing. Ids in a dry-run result are placeholders; the call that writes returns the real ones. | |
| layout | No | Layout engine (default layered). | |
| status | No | ||
| 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. | |
| preview | No | With dryRun: also render a PNG (the whole poster, as export_diagram draws it). | |
| diagramId | Yes | Diagram id (from list_diagrams or create_diagram). | |
| 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. | |
| placement | No | Where to put the drawing: "auto" (default; right of existing content, or 0,0 on an empty canvas), "right", "below", or a top-left point { x, y } in world pixels. | |
| infographic | No | Infographic spec: theme + blocks; the server measures and lays the blocks out on a 12-column poster. Read read_me topic "infographics". |