Render a diagram IR to SVG
renderValidates an ArchSmith diagram IR and converts it into a complete SVG document, returning validation errors instead of broken geometry when the input is invalid.
Instructions
Validates then renders an ArchSmith diagram IR to a complete SVG document. Call get_schema and get_registry first to learn the required IR structure and governed vocabulary before authoring a document. Font embedding defaults to false to keep MCP responses compact; only opt in if the SVG must render portably without installed fonts — embedding adds a font subset sized to this diagram's own text, not a fixed cost, but it's still an added cost worth opting into deliberately. A render under 25,000 bytes is returned as one text content block; a larger one (e.g. a big diagram, or embedFonts:true on one) is returned as a resource_link instead, fetchable via resources/read, so the tool result itself never grows unbounded. Fails with the validation errors (isError: true) instead of rendering if the IR is invalid — never renders broken geometry from an invalid document.
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": {
"ir": "<ir>"
},
"name": "render"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ir | Yes | The diagram IR document to render. | |
| embedFonts | No | Embed the bundled Arimo font for portable rendering, subset to just the glyphs this diagram's text needs (not the whole font). Default: false. |