Re-render Diagram
rerender_diagramRe-render a diagram from the viewer’s existing source using a chosen theme and output format, returning the rendered image and viewer links for display.
Instructions
Render the viewer’s diagram source again with the selected theme and format. Returns content_base64, mime_type, url, playground, and display_markdown. Hidden from the model; callable from ui://uml-mcp/diagram-viewer via tools/call.
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": {
"diagram_type": "<diagram_type>",
"code": "<code>"
},
"name": "rerender_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Diagram source text in the language selected by diagram_type, taken from the viewer’s previous render. | |
| scale | No | SVG scale factor; ignored unless output_format is svg. | |
| theme | No | Visual style for the selected renderer; omit to use its default styling. | |
| diagram_type | Yes | Catalog key selecting the source language and renderer for this diagram. | |
| output_format | No | png (default), svg, or jpeg for the viewer. | png |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| code | Yes | ||
| error | No | ||
| source | No | ||
| success | No | ||
| attempts | No | Renderers tried, in order: backend, ok, status, duration_ms, error_summary, error_code, retry_count. | |
| cache_hit | No | ||
| mime_type | No | ||
| render_ms | No | ||
| local_path | No | ||
| playground | No | ||
| inline_note | No | ||
| diagram_type | No | ||
| error_detail | No | Failed requests only: code, message, retryable, line, column, suggestion, diagram_type, backend. | |
| fallback_used | No | ||
| output_format | No | ||
| content_base64 | No | Bounded inline preview (max 48,000 base64 characters); larger images use a resized PNG preview when possible. | |
| inline_omitted | No | ||
| source_omitted | No | ||
| cache_lookup_ms | No | ||
| preview_resized | No | ||
| display_markdown | No |