Skip to main content
Glama

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

NameRequiredDescriptionDefault
cwdYesThe game project's folder.
dprNoDevice pixel ratio, 1 by default. `look` boxes stay in CSS pixels.
urlNoA 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).
gameNoThe name the game was opened under with the `open` tool, to act on ("main" by default; a subagent uses its own).
sizeNoThe page's width and height in CSS pixels until the next open, 1280 × 800 by default, as [1920, 1080].
deviceNophone: 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.
windowNoShow the browser's window.
browserNoThe 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.
commandNoA 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.
networkNoAlso 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.
reducedMotionNoThe page gets prefers-reduced-motion: reduce; `look` then says how much of the picture changed since the last look.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.5
    • addedInput schema / properties / device
      Added value: +{
      +  "description": "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.",
      +  "enum": [
      +    "phone"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / network / description
      Previous value: -"Also time a first visit on this network (Chrome DevTools' presets), in real time with no cache: 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."New value: +"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."
    • removedInput schema / properties / network / enum
      Removed value: -[
      -  "slow-4g",
      -  "fast-4g",
      -  "3g"
      -]
    • changedInput schema / properties / network / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "object"
      +]
  2. First observedv0.2.1

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnlyHint=false and openWorldHint=true; the description goes well beyond that, disclosing that it closes any page already open under the same `game` name, starts and later stops a dev-server `command`, writes geo.js and fx.js into a served folder but never over a newer copy, launches headless on a paused seeded clock, and caps concurrency at four. For a side-effecting, open-world tool these are exactly the consequences an agent needs before invoking it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the verb and resource, and no sentence is filler — the long catalogue of diagnostics (fetched assets, failed fetches, command errors/warnings, a zero-height canvas, page text) is necessary because there is no output schema. It loses a point for run-on construction: the second sentence packs six separate checks and three parentheticals into one comma chain, making it harder to scan than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, side-effecting tool with no output schema, the description covers lifecycle (open once, auto-reload, close on reopen), side effects (file writes, dev-server spawn/stop), and a full inventory of what the reply reports. It stops short of failure modes — what happens if the URL is unreachable or the page never loads, and whether the call blocks until load — which an agent debugging a broken build would want.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already documents url, command, game, network, device, browser and dpr in detail, so the description mostly restates it ("Give a file or folder to serve (`url`, relative to cwd), an http URL, or a dev-server `command` run in cwd"). It does add cross-parameter semantics the schema does not carry — that a `url` on the same origin restarts a stopped command, and that the `game` name ties into the four-game limit — but on balance the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — opens a three.js / React Three Fiber / WebGL page in headless Chrome — and scopes it to games, viewers, configurators, simulations and shader demos. It also names the sibling tools (interact, look, observe, eval, feel) whose behaviour it changes, so an agent can place it in the workflow without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ("Use it when such a page has been written or changed") and an explicit when-not ("Open once: after an edit, the next `interact`, `look`... reloads the page by itself"), which prevents the common mistake of re-opening after every edit. It also gives the concurrency rule (up to 4 games, each under its own `game` name) and the subagent convention of opening under `game: "tester"` and passing that name to every later call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.