build_model
Create and populate a system dynamics model in one call, including simulation specs, stocks, flows, and connectors, with validation and error detection.
Instructions
Create and populate a model in one call: sim specs, stocks, auxiliaries, flows, connectors, and modules. All-or-nothing — on any item error nothing is registered and the error names the failing item (stage + index). Connector sync and validation run by default, so the response doubles as an inspection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Model name | |
| model_id | No | Optional model ID to assign in this session | |
| sim_specs | No | Simulation time settings | |
| stocks | No | Stocks to add (applied first) | |
| auxs | No | Auxiliary variables to add (applied after stocks) | |
| flows | No | Flows to add (applied after stocks and auxs) | |
| connectors | No | Explicit connectors to add (applied after variables) | |
| modules | No | Modules to create (applied last) | |
| sync_connectors | No | Run sync_connectors_from_equations after applying items | |
| validate | No | Include validation results in the response |