Skip to main content
Glama

snapshot

Compares rendered video frames against approved PNGs for visual regression and fails when a frame differs.

Instructions

Compare frames with approved PNGs (visual regression); fails when a frame differs.

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>",
      "specs": "<specs>"
    },
    "name": "snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirNothe approved PNGs (default: _frame_snapshots)
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
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)
specsYescomma-separated times: 120 (frame), 3.2s, 1:05.5, 50%, start, end, Intro, #3, Intro@1.5s, Intro@50%, a cue: drop, drop@0.5s
scriptYesthe video script (.lua)
updateNoaccept the current frames
max_diffNothe fraction of pixels allowed to differ (default: 0.001)
softwareNodraw on the CPU instead of the GPU
thresholdNothe per-channel difference that counts (default: 16)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the key behavioral trait that the tool fails on a mismatch, which is more than the schema says. But it omits that the tool writes to disk when `update` is set (accepting current frames), that it reads from a directory of approved PNGs, and how failures are surfaced.

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

Conciseness5/5

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

A single front-loaded sentence with the comparison target first and the failure consequence second. Nothing is wasted and nothing is buried.

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?

This is a 12-parameter tool with nested objects, no annotations and no output schema, so the description should do more work than one sentence. The rich schema compensates for argument semantics, but the agent still has to infer the accept-baseline workflow (`update`), where approved PNGs live, and what a passing run yields.

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 all 12 parameters are already documented in detail (specs time syntax, now/RFC 3339 semantics, set precedence rules, threshold, max_diff). The description adds no parameter-level meaning beyond what the schema supplies, so the baseline 3 applies.

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 specific verb and resource: 'Compare frames with approved PNGs (visual regression)'. The parenthetical names the workflow it serves, so an agent can place it without opening the schema. It stops short of distinguishing itself from plausible siblings such as frame or onion, which also concern frame rendering.

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

Usage Guidelines3/5

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

The phrase 'visual regression' implies the when: run after producing frames to check they still match the approved set. No explicit when-not guidance, no mention of how to create or refresh the approved images (which the `update` and `dir` params reveal), and no statement of preconditions such as needing an existing snapshot directory.

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