Generate diagram image
generate_diagram_imageGenerate a deterministic, exact-text editorial visual for an article. Use this instead of AI image generation for KPI comparisons, flow diagrams, process maps, system architecture, timelines, comparison frameworks, and wireframes. Use editorial-cards for independent educational summaries (architecture or comparison, 2-6 cards, no edges): larger type and icons, solid surfaces, and an automatic stacked mobile image. Use editorial-minimal for connected diagrams, wireframes and metric plots. Both use saved Brand Kit colors and typography. The result is uploaded to S3 with Markdown for embedding. Insert the returned markdown verbatim; editorial-cards includes both desktop and mobile assets in a picture embed.
Creates a stored diagram asset without publishing content. Use generate_chart_image for numeric series and generate_image for expressive illustration; preserve user-supplied labels exactly.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"edges": [
{
"to": "review",
"from": "draft"
}
],
"nodes": [
{
"id": "draft",
"label": "Draft"
},
{
"id": "review",
"label": "Review"
}
],
"title": "Editorial review",
"diagramType": "process"
},
"name": "generate_diagram_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | No | Directed relationships between node ids. For flow, process, and timeline diagrams, omitted edges create a sequence in node order. | |
| nodes | Yes | Nodes in display order. Use stable IDs to connect them with edges. | |
| theme | No | brand uses the saved chart background; light/dark derive a contrasting canvas from the Brand Kit. | brand |
| title | Yes | Heading displayed at the top of the image. | |
| width | No | Image width in pixels, from 800 to 2400. Leave unset for width fitted to the content. | |
| height | No | Canvas height in pixels, from 420 to 1800, for editorial-minimal. The cards layout computes height from the content. | |
| legend | No | Legend below the subtitle explaining the line styles and colors. | |
| context | No | User task for usage analytics. Omit private details. | |
| filename | No | Name for the stored image file, such as product-flow. | |
| subtitle | No | Supporting line displayed below the heading. | |
| llm_model | No | Exact model ID from the calling runtime. Send on every call when known. Omit if unavailable. | |
| projectId | No | Project ID from list_projects. Omit to use the configured or sole accessible project. | |
| footerNote | No | Source, methodology or scope printed below the visual. | |
| diagramType | Yes | Meaning of the visual structure, such as ordered stages for a process or grouped components for an architecture. | |
| orientation | No | Primary direction the diagram is read, left to right or top to bottom. | horizontal |
| stylePreset | No | editorial-minimal: connected diagrams and metric plots. editorial-cards: 2-6 independent educational cards, architecture/comparison only, no edges or legend; returns a responsive picture embed with a stacked mobile asset. | editorial-minimal |
| outputFormat | No | SVG retains vector detail. PNG is convenient for raster-only destinations. | png |
| showTypeBadge | No | Whether to show the diagram type beside the heading. | |
| showStepNumbers | No | Show numbered step circles. Defaults on only for process and timeline diagrams. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Diagram URL, embed Markdown and any responsive variants, plus applied visual settings. | |
| success | Yes | True when the tool returns normally. | |
| executionTime | No | Elapsed time, e.g. 0.12s. |