Generate a private architecture diagram
generate_diagramCompile architecture JSON to a private, expiring preview. Does not publish. Review the preview, then use publish_html or update_page with generationId. Reuse clientRequestId only with identical arguments. theme contains bounded diagram tokens; styleRef pins an exact saved style version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | Architecture JSON: {schemaVersion:1,title,description,groups:[{id,label}],nodes:[{id,label,kind,group}],edges:[{id,from,to,label}]}. All shown fields are required; only optional field is generatorVersion (omit on creation; preserve returned version for updates). Use 1-8 nonempty groups, 1-40 nodes, 0-60 edges. kind is service|store|queue|actor|external. IDs are unique within their collection, match ^[a-z][a-z0-9-]{0,63}$; node.group references a group, edge.from/to reference nodes; no self-loops. Nonempty printable Latin-1 text only: title <=120, description <=1000, group label <=48, node/edge label <=64 characters. No extra fields, coordinates, HTML or CSS. Spec <=100000 UTF-8 bytes; full generation request <=128 KiB. | |
| theme | No | Preset "neutral" (default), "dark", "paper", or object with optional preset plus overrides. Colors canvas,surface,ink,muted,line,accent use #RRGGBB. Integer pixel tokens: fontSize 14-22, labelFontSize 12-16, padding 10-24, nodeWidth 200-320, nodeGap 32-100, layerGap 80-180, radius 0-16; fontWeight 400 or 600. Font is bundled Inter. Text must contrast >=4.5:1 against canvas/surface; line versus canvas and accent versus surface >=3:1. Unknown tokens reject. With styleRef, theme must be an override object; saved palette/density map first and unsupported style traits are disclosed in diagnostics. | |
| styleRef | No | Exact active style version returned by get_artifact_style. Records requested provenance and is not evidence of visual fidelity. | |
| clientRequestId | Yes |