design_diagram
Render a positioned diagram spec in Microsoft Visio and export .vsdx and .png files. Optionally draw with primitive shapes when the required stencil is not installed.
Instructions
PHASE 3 of diagram generation. Renders the positioned spec in Visio and saves <out_basename>.vsdx plus <out_basename>.png. Resolves the diagram type's stencil first; if it is not installed this returns status "needs_download" and renders nothing unless allow_primitive_fallback=true. Visio stays open and visible.
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": {
"spec": "<spec>"
},
"name": "design_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The positioned spec from plan_diagram. | |
| out_dir | No | Output directory. Default: current working directory. | |
| png_dpi | No | PNG export resolution. Default: 150. | |
| out_basename | No | Output file base name (no extension). Default: "diagram". | |
| allow_primitive_fallback | No | Draw with primitives if the stencil is not installed. Default: false. |