Skip to main content
Glama

preview

Open a live window that plays a Lua video script with sound and reloads when the script or media change; users mark ranges and moments there, saved to a marks file you read back.

Instructions

A window that plays the video (or a video or sound file) with sound and reloads when the script or media change; the user marks ranges ([ ]) and moments (P) for you there; playback that misses frames renders smaller (down to 25%), paused frames at full size. It opens for the user and the call returns at once; the window stays open (one per script). What the user marks is in the file beside the script or clip (NAME.marks.json): read it with show, path marks.

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": {
      "script": "<script>"
    },
    "name": "preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNowhere to start, a time spec (default: the start)
nowNothe wall clock at the video's first frame (Lua: f.now, seconds since 1970): an RFC 3339 time with its zone (2026-11-02T14:05:00Z, 2026-11-02T15:05:00+01:00) or seconds since 1970; preview --live runs on the system clock instead (default: 0, 1970-01-01T00:00:00Z)
setNoscript arguments (Lua: arg.K, a string) that also set props.K (a number when it looks like one); they win over a batch row, which wins over the props file
bareNothe video alone (no controls, panels or timeline), played once, then the window closes; Escape closes it sooner
liveNoa live board (signage): the video alone, fullscreen, played once and then running on past its end for good, f.now the system clock; a changed file beside the script swaps the new version in without a pause (a failing one keeps the last good one and says why on stderr); no keys but Control+Q
muteNono sound
mediaNofonts, images and sounds (default: media/ beside the script)
propsNoa JSON object the script reads as the table props (props.title, ...)
scaleNooutput resolution factor, e.g. 0.5 for half resolution (rounded to an even size)
pausedNoopen paused
scriptYesthe video script (.lua)
no_loopNostop at the end
presentNoa presentation: the video alone, fullscreen, waiting at each scene's end (its hold) for Right, Space, Page Down or a click; Left or Page Up back a scene, B black, P pause, Escape closes
softwareNodraw on the CPU instead of the GPU
fullscreenNoopen fullscreen (F toggles)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it explains that the call returns immediately while the window stays open, that there is one window per script, that it reloads on script or media changes, and that dropped frames reduce render size. It omits some error and concurrency details, but provides substantial context beyond the schema.

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

Conciseness3/5

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

The description is a single dense sentence-like paragraph with semicolon-separated clauses. It front-loads the core purpose, but the structure is hard to parse and some details could be organized more clearly.

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 a complex 15-parameter GUI tool with no output schema, the description covers the key asynchronous behavior, marking workflow, reload behavior, and performance fallback. It leaves some alternative-tool guidance implicit, but is largely sufficient for correct invocation.

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%, so the parameter meanings are already well documented. The description adds context about media reloading and the marks file path, but does not add much parameter-specific semantics beyond what the schema already provides.

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?

The description states that this opens a window playing video or sound with marking support, which is a clear purpose. It does not explicitly contrast itself with sibling tools such as render, snapshot, or show, but the core action is identifiable.

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

Usage Guidelines2/5

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

There is no explicit guidance about when to use preview instead of alternatives. The only sibling reference is that marks should be read with show, which is a follow-up action rather than a usage rule for preview itself.

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