js_eval
Execute JavaScript in Deadlock's Panorama UI to inspect panels, test live changes, and return JSON-serialized results; keep contexts alive for event handlers and scheduled callbacks.
Instructions
Run JavaScript inside Deadlock's Panorama UI and return the result (JSON-serialised; panels are described as {panel: {...}}).
A single expression is returned automatically; multi-statement code must return a value.
In scope: $ (Panorama API), $panel (target panel; default the bridge panel), $root (top-level
panel), $find(id), $query(structuredSelector), $children(p), $describe(p).
target: panel id ('#Foo' or 'Foo'), 'root', or 'bridge'.
keep_context=True keeps the script's context alive so event handlers / $.Schedule callbacks it
registers keep working (otherwise contexts are recycled after ~64 requests).
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": "js_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ui | No | auto | |
| code | Yes | ||
| target | No | ||
| timeout | No | ||
| keep_context | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |