run_js
Debug Three.js visuals by executing JavaScript in the live page with scene, renderer, camera, and gl in scope; return values for inspection.
Instructions
[DEBUG VISUAL] Temporary visual aid in the browser. Nothing to put in code.
Run JavaScript in the page with scene, renderer, camera, gl in scope; return a value to get it back. Changes made here are NOT recorded in pending_changes — prefer the set_* tools for anything the user may want to keep.
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": "run_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript body. Vars: scene, renderer, camera, gl |