generate-diagram-image
Generate a PNG image from the current C4 diagram state by sending PlantUML code to the PlantUML server. Call it after diagram edits to create the visual output for users.
Instructions
Generate a PNG image from the current state of the diagram.
This tool generates a visual representation (PNG) of your C4 diagram by sending the PlantUML
code to the PlantUML server. It should be used ONLY when you've finished designing your
diagram to avoid rate limiting issues with the PlantUML server.
All other diagram modification tools (add-element, add-relationship, etc.) only update
the PlantUML source file but do not generate the image. You must explicitly call this
tool when you have finished designing your diagram to create its visual representation
for the user.
Required Input Fields:
- projectId: String (UUID from create-c4-project)
- diagramId: String (UUID from create-context-diagram or create-container-diagram)
Response Fields:
- message: String (User-friendly message about the operation)
- projectId: String (UUID of the project)
- elementIds: Object (Mappings of element UUIDs to their names)Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"diagramId": "<diagramId>"
},
"name": "generate-diagram-image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diagramId | Yes | UUID of the diagram from create-context-diagram or create-container-diagram | |
| projectId | Yes | UUID of the project from create-c4-project |