vars.set
Sets a global variable that automations and widgets read.
JSON-RPC 2.0project.write
Parameters
- namestringrequiredThe variable's name.
- valueanyIts value. Default null.
Errors
Invalid params (-32602) without name.
From an AI agent
The MCP server's widgets (action: set_var) reaches this method.
Example
{ "jsonrpc": "2.0", "id": 1, "method": "vars.set", "params": { "name": "deaths", "value": 12 }}lightair call vars.set '{"name":"deaths","value":12}'const result = lightair.call("vars.set", {"name":"deaths","value":12});Result
{}