Skip to main content
Glama

start_preview

Launch a live preview of a web app by running a task's dev server or prototype directory in a locked-down Docker container, published only on 127.0.0.1; returns the preview URL and page check.

Instructions

Preview a web app live: run a heads-down task's dev server (execution_id and task_id) or a duel prototype directory (prototype) in a locked-down Docker container, published on 127.0.0.1 only (no tunnel, never 0.0.0.0). It runs the package's dev, start or preview script (script picks one) as npm run <script>; the server must listen on 0.0.0.0 and honour PORT. When the source has no installed packages the dependencies are installed inside the container, through a proxy that allows only the npm registry, with lifecycle scripts off. Returns the preview id and its http://127.0.0.1: url, and the page check. The dashboard task page, the duel room and the serve index embed it. Idle previews stop after 30 minutes; at most 3 run at once.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "start_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoThe port the dev server listens on in the container (default: the usual port of the package's dev server, else 3000).
scriptNoThe package script to run (default: the first of dev, start, preview that exists).
task_idNoThe task whose worktree to preview.
prototypeNoInstead of a task: an absolute prototype directory under the prototype root (a duel team's version).
execution_idNoThe heads-down run (exe-…); goes with task_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag non-read-only, open-world, non-idempotent and non-destructive; the description goes far beyond by disclosing the sandbox (locked-down Docker), network binding (127.0.0.1 only, never 0.0.0.0, no tunnel), dependency-install behavior (npm-registry-only proxy, lifecycle scripts off), and operational limits (30-minute idle stop, max 3 concurrent). These are exactly the traits an agent needs before launching a long-lived process.

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?

The purpose and binding constraints are front-loaded, and most sentences carry unique operational information. It is dense and slightly run-on in the middle, with the dependency-install aside competing for attention, but nothing is redundant.

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

Completeness5/5

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

With no output schema, the description correctly explains the return value (preview id, http://127.0.0.1:<port> url, and a page check) and covers lifecycle limits. For a long-running, network-bound tool with five optional parameters, the coverage is sufficient to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the server must listen on 0.0.0.0 and honour PORT, and the script is invoked as `npm run <script>`, which clarifies how the port and script parameters actually behave. It does not restate the execution_id/task_id pairing constraint beyond the parenthetical.

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?

The description opens with a specific verb and resource ("Preview a web app live") and immediately names the two sourcing modes (a task's dev server via execution_id/task_id, or a duel prototype directory). This is clearly distinguishable from the sibling stop_preview and from the start_* meeting/duel tools.

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?

It gives a clear selection rule between the two input modes ("Instead of a task: an absolute prototype directory"), plus context on who embeds the preview (dashboard task page, duel room, serve index). It stops short of stating when not to use it or naming stop_preview as the teardown counterpart.

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