execute_script
Runs Python code on an Ignition gateway and returns the result, enabling gateway-scope automation and system.* access; disabled unless writes and gateway URL are enabled.
Instructions
Execute a Python script on the Ignition gateway and return the result.
DISABLED by default — requires the server to be started with --gateway-url AND --enable-writes. Scripts run in gateway scope with access to system.* functions and can change gateway state or actuate equipment.
Args: code: Python code to execute on the gateway.
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": {
"code": "<code>"
},
"name": "execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |