open
Loads a three.js or WebGL page in headless Chrome on a paused, seeded clock, then reports fetched or failed assets, errors, and layout problems for debugging.
Instructions
Opens a three.js, React Three Fiber or WebGL page (a game, viewer, configurator, simulation or shader demo) in headless Chrome (or the browser given) on a paused, seeded clock, closing any page already open under the same game name, and lists the asset files (models, textures, sounds) it fetched and any fetch that failed, what a dev-server command printed as an error or warning, a canvas with no height, and the page's text outside the canvas. Open once: after an edit, the next interact, look, observe, eval or feel reloads the page by itself. Use it when such a page has been written or changed. Give a file or folder to serve (url, relative to cwd), an http URL, or a dev-server command run in cwd. It writes geo.js and fx.js into a served folder, never over a newer copy. Up to 4 games can be open at once, each under its own game name: a subagent opens its own (game: "tester") and passes that name to every call.
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": {
"cwd": "<cwd>"
},
"name": "open"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | The game project's folder. | |
| dpr | No | Device pixel ratio, 1 by default. `look` boxes stay in CSS pixels. | |
| url | No | A file or folder to serve (relative to cwd), an http URL, or, with `command`, the path and query to open on the server it starts (its origin is the one the command prints). | |
| game | No | The name the game was opened under with the `open` tool, to act on ("main" by default; a subagent uses its own). | |
| size | No | The page's width and height in CSS pixels until the next open, 1280 × 800 by default, as [1920, 1080]. | |
| device | No | phone: a phone's user agent, touch points, coarse pointer and no hover, at 390 × 844, DPR 3 unless `size` and `dpr` say otherwise, for a game that picks its mobile path at load. | |
| window | No | Show the browser's window. | |
| browser | No | The browser engine the page runs in, chrome by default. firefox is Firefox. Every tool works in each; network (here and in `perf`), `perf`'s throttle and its main-thread time are chrome only. | |
| command | No | A dev-server command run in cwd, as `npx vite --port 0`; the first localhost URL it prints is the page. Closing or reopening this game stops it; an `open` with a url on its origin restarts it on that url. | |
| network | No | Also time a first visit on this network, in real time with no cache: slow-4g, fast-4g or 3g (Chrome DevTools' presets), broadband (20 Mbps both ways, 40 ms), or { downKbps, upKbps, latencyMs } (upKbps defaults to downKbps). The reply names its numbers and whether a software renderer drew it, and says when the first scene frame came, which bytes came before it by kind (as sent: the harness's own server does not compress, a CDN does) and when an overlay over the canvas went. | |
| reducedMotion | No | The page gets prefers-reduced-motion: reduce; `look` then says how much of the picture changed since the last look. |