add_variables
Add multiple stocks, auxiliaries, flows, connectors, and modules to an existing model in a single all-or-nothing call. On error, the model remains unchanged and the failing item is identified.
Instructions
Add multiple stocks, auxiliaries, flows, connectors, and/or modules to an existing model in one call. All-or-nothing — on any item error the model is left unchanged and the error names the failing item (stage + index).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | No | Session-scoped model ID. Optional; defaults to the current model for this session. | |
| 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 |