Download Diagram
download_diagramExport rendered diagrams as source, SVG, PNG, PDF, or standalone HTML by supplying diagram type and code, then repeat the SHA-256 digest to fetch remaining chunks.
Instructions
Download source, SVG, PNG, PDF or HTML chunks. Repeat sha256 on follow-ups.
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": "download_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source text to export or render. | |
| theme | No | Selected diagram theme; omit to preserve source styling. | |
| offset | No | Base64 character offset, starting at zero then next_offset. | |
| sha256 | No | Digest from the first chunk; repeat on subsequent calls. | |
| diagram_type | Yes | Catalog key of the diagram renderer. | |
| output_format | No | source, svg, png, pdf or html; HTML is standalone. | svg |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunk | Yes | ||
| total | Yes | ||
| offset | Yes | ||
| sha256 | Yes | ||
| filename | Yes | ||
| mime_type | Yes | ||
| next_offset | Yes |