Skip to main content
Glama

Run a three.js page headless

three_check

Open a three.js page in headless Chromium to report console, shader, WebGL, and blank-frame failures, compare approved screenshots, and inspect the scene before shipping changes.

Instructions

Open the page in headless Chromium (software WebGL 2) and report what a user would see go wrong: console and page errors (each with its likely cause and fix; shader errors point at your file and line), failed requests, no canvas or WebGL context, lost context, blank frames, the three revision, and a screenshot. baseline compares with an approved screenshot (created on first run) and reports the changed share with a diff image. steps interact first. When the frame is blank it also inspects the scene. Run it before you call a change done.

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": {
      "target": "<target>"
    },
    "name": "three_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoFolder to serve when the page needs files above its own folder (for example ../node_modules).
waitNoMilliseconds to let the scene run (default 2000).
entryNoHTML file in the folder (default index.html)
stepsNoInteractions before the screenshot: click (selector or x,y), press (key), drag, wheel, wait, wait-for.
widthNo
heightNo
ignoreNoconsole messages containing this text are ignored
targetYesFolder with the page (index.html), or the http(s) URL of a running dev server.
webgpuNo
inspectNoAlso read the live scene graph and say why objects are not visible (done anyway when the frame is blank).
baselineNoBaseline name; created on first run.
toleranceNo
screenshotNoreturn the screenshot image (default true)
update_baselineNo

Output Schema

NameRequiredDescriptionDefault
okYes
urlYes
errorsYes
framesYes
baselineNo
contextsYes
findingsYes
warningsYes
truncatedYes
screenshotNo
threeRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already mark this as non-read-only and open-world, and the description usefully adds that a baseline file is 'created on first run' (explaining the non-idempotent hint) and that the frame is inspected automatically when blank. It still omits operational context an agent needs: that headless Chromium must be available, roughly how long a run takes, and whether artifacts are persisted to disk.

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 core action and the failure taxonomy, then parameter notes, then a closing imperative. Dense but nearly every clause carries information; the long enumerations of error classes are justified given the tool's diagnostic purpose.

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?

An output schema exists, yet the description still summarizes the returned diagnostics, and a 14-parameter headless-browser tool gets adequate coverage of its main modes (check, baseline diff, scripted steps, inspection). Gaps remain around environment prerequisites and timeout/failure behavior when the browser cannot launch.

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 coverage is 64% and the description adds real meaning for `baseline` (approved-screenshot comparison, created on first run, changed share plus diff image), `steps` (interaction before capture) and `inspect` (scene graph read, automatic on blank frames). Several parameters with no schema text, notably `webgpu`, `tolerance`, and `update_baseline`, are never explained in the description either, so it does not fully compensate.

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

Purpose4/5

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

States a concrete verb and resource: opens the page in headless Chromium with software WebGL 2 and reports a specific list of failure signals (console/page errors, failed requests, missing canvas, lost context, blank frames, revision, screenshot). It is far more specific than a tautology, though it never names which sibling (e.g. three_inspect, three_page, three_play) it replaces, so the boundary must be inferred.

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

Usage Guidelines4/5

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

Gives a clear trigger: 'Run it before you call a change done,' which tells the agent when this tool belongs in a workflow. `steps` is framed as a precondition-style variant ('interact first'). There are no explicit when-not-to-use statements or named alternatives, which keeps it below a 5.

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