Skip to content
Changelog

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

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "vars.set",
"params": {
"name": "deaths",
"value": 12
}
}

Result

{}

automation.list