Skip to main content
Glama

Keep a three.js page running between calls

three_session

Starts, lists, and stops persistent headless three.js pages so a slow or hard-to-reach scene loads once and stays available for inspection and interaction across calls.

Instructions

Start a headless page that stays open between tool calls (op start), so a scene that takes long to load or a state that is hard to reach is loaded once; three_page then looks at it and drives it. op status lists the open pages, op stop closes one. It stops by itself after 10 minutes without calls. Several pages can run side by side under different names (default main).

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": {
      "op": "<op>"
    },
    "name": "three_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes
nameNoname of the page (default main)
rootNofolder to serve when the page needs files above its own folder
waitNoms to let the scene run after load (default 1500)
entryNo
widthNo
heightNo
targetNoFolder with the page (index.html), or the http(s) URL of a running dev server.
webgpuNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare openWorldHint=true, readOnlyHint=false and idempotentHint=false, but the description adds genuinely new behavior: a 10-minute idle self-stop, support for several concurrent pages, and the default page name 'main'. That timeout is critical for an agent to know. It doesn't mention resource cost or whether a start can fail on a bad target, keeping it below a 5.

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?

Purpose is front-loaded in the first clause, and every following clause carries information (op semantics, timeout, naming). The semicolon-chained single paragraph is dense but not padded; no sentence restates the title.

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

Completeness3/5

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

With 9 parameters and no output schema, the agent still needs to know what 'start' returns (a page handle? a name to pass to three_page?) and how failures surface. The lifecycle and timeout are well covered, but the return/consumption contract is left implicit.

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 44%, so the description should compensate more than it does. It clarifies op values (start/stop/status) and the name default, but leaves root, wait, entry, width, height, target and webgpu entirely to the schema — and entry, width, height, webgpu have no schema descriptions at all. Baseline 3 is right: partial added meaning, clear gaps.

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 ('Start a headless page that stays open between tool calls') and immediately distinguishes it from the sibling that consumes the page ('three_page then looks at it and drives it'). The three ops (start/status/stop) are each named, so an agent knows the tool is a lifecycle manager, not a scene viewer.

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 selection criterion: use it when a scene 'takes long to load or a state that is hard to reach is loaded once'. It also names three_page as the companion and explains stop/status for cleanup. It doesn't say when to skip persistence entirely (one-shot loads), so it stops short of explicit when-not guidance.

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