render_diagram
Generate an SVG stock-and-flow diagram from a Stella model. Returns inline SVG and optionally saves to a file with automatic layout.
Instructions
Render the current model as an SVG stock-and-flow diagram. The SVG is returned inline (for clients without file access) and optionally written to a file. Defaults to running auto-layout first so freshly built models render sensibly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | No | Session-scoped model ID. Optional; defaults to the current model for this session. | |
| filepath | No | Optional output path (.svg); parent directory must exist | |
| auto_layout | No | Run auto-layout before rendering (same semantics as save_model) |