load_system
Create a complete water-handling system from a single system document, returning a system_id for simulation. Invalid components, connections, or values are listed with expected shapes for fixing.
Instructions
Build a whole system in one call from a system document; returns its system_id.
The quickest way to create a system: every component (with parameters and inputs), connection and control in one document, then solve. get_system returns such a document. A wrong shape fails with every schema error and the expected shape of the offending part; unknown types, ports and invalid values are kept and listed in issues (the check_system report, no need to call it): fix every error, then solve.
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": {
"document": "<document>"
},
"name": "load_system"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document | Yes | A system document (object, or YAML/JSON text), e.g. {'worldparts_system': '0.1', 'name': 'line', 'components': [{'name': 'mains', 'type': 'supply', 'parameters': {'pressure': '3 bar'}}, {'name': 'v', 'type': 'valve', 'inputs': {'opening': 0.5}}, {'name': 'out', 'type': 'drain'}], 'connections': [['mains.port', 'v.port_a'], ['v.port_b', 'out.port']]}. Components are {name, type, parameters?, inputs?, states?}; optional 'controls' ({name, type, measure, actuate, ...settings of add_control}) and 'simulation' {duration, step?, events?}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| issues | Yes | ||
| controls | No | ||
| system_id | Yes | ||
| components | Yes | ||
| connections | Yes | ||
| description | No | ||
| unconnected_ports | Yes |