flexsim_execute_script
Execute FlexScript code in an open FlexSim model and return the result. Requires a bridge node; end with 'return ;' to get output.
Instructions
Execute FlexScript inside the open model and return its result.
Needs the bridge node (see flexsim_bridge_status). End the script with `return <value>;`
to get a value back.
Safety: ArrivalStyle/FlowItemClass writes, PerformanceMeasureTables.addRow and
overwriting bridge/mcp_template.fsm are blocked (they hung or corrupted FlexSim).
Args:
script: FlexScript code
Examples:
script='return Model.find("Queue1").subnodes.length;'
script='return getmodeltime();'
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": {
"params": "<params>"
},
"name": "flexsim_execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |