save_model
Save NetLogo model code to a .nlogox file for opening in the desktop app, enabling live visualization with GUI, sliders, and animation.
Instructions
Save NetLogo model code to a .nlogox file in the models directory.
This saves the model so you can open it in the NetLogo desktop app for live visualization with GUI, sliders, and real-time animation.
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": {
"name": "<name>",
"code": "<code>"
},
"name": "save_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | NetLogo model code (procedures only — envelope added automatically). Or provide a full .nlogox XML file. | |
| name | Yes | Filename for the model (without extension). | |
| widgets | No | Optional interface widgets — same schema as create_model (slider/switch/button/monitor). Slider/switch widgets DEFINE their variable; don't also declare it in `globals [...]`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |