set_vensim_equation
Update a variable's equation, unit, or note in an existing .mdl file while preserving the model diagram; optionally sync information arrows and write to a new path.
Instructions
Change a variable's equation, unit or note in an existing .mdl, keeping the diagram.
Leave a field as null to keep it. With sync_links, information arrows into the variable are added for newly used variables and removed for ones no longer used. Writes the model in place (a backup is kept) unless output_path is given. If the model is open in Vensim, reopen it afterwards without saving.
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": {
"model_path": "<model_path>",
"variable": "<variable>"
},
"name": "set_vensim_equation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| unit | No | ||
| equation | No | ||
| variable | Yes | ||
| model_path | Yes | ||
| sync_links | No | ||
| output_path | No |