run_lua_script
Execute inline Lua scripts directly on a grandMA2 console for one-off automations without creating a persistent Plugin pool entry.
Instructions
Execute an inline Lua script directly on the grandMA2 console.
Sends the script using the Lua keyword. Useful for one-off
automations without creating a persistent Plugin pool entry.
Args:
script: Lua source code (e.g. 'print("hello")', 'gma.cmd("Blackout")').
confirm_destructive: Must be True to proceed. Defaults to False (blocked).
Returns:
str: JSON with command_sent and raw_response.
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": {
"script": "<script>"
},
"name": "run_lua_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| confirm_destructive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |