tv_evaluate
Run custom JavaScript on a Smart TV app to inspect state, perform assertions, or restore localStorage after a debug session. Supports promises and any configured device.
Instructions
Run arbitrary JavaScript in the app page and return the value (escape hatch). Use for custom assertions, reading app state, or restoring localStorage after a debug relaunch. Old TVs are Chrome 38 — keep the expression ES5.
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": {
"expression": "<expression>"
},
"name": "tv_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Device id from devices.json. Omit to use the default device. | |
| expression | Yes | JS expression to evaluate in the page. | |
| awaitPromise | No | Await a returned promise (default true). |