Skip to main content
Glama

sample_frames

Extract frames from a video at a fixed rate, explicit timestamps, or scene changes, then return image paths and inline previews so an agent can verify what happened on screen.

Instructions

Sample frames from a video so the agent can actually view what happened: either at a fixed rate (fps) or at explicit timestamps. Writes PNG frames to a folder and returns their paths, plus the first few frames inline so the model can view them directly (disable with returnImages: false).

Input Schema

NameRequiredDescriptionDefault
fpsNoSample this many frames per second (mode 'fps').
modeNoHow to pick frames. 'scenes' returns only frames where the screen changed (plus the first frame), strongest changes first up to maxFrames, which is usually the cheapest way to review a recording. Defaults to 'fps' or 'timestamps' depending on which of those is given.
inputYesPath to the source video file.
dedupeNoMode 'fps': drop frames that are nearly identical to the previous one (default false).
maxFramesNoMost frames this call may write (default 100, max 1000). In fps mode a rate that would exceed it is lowered so the frames still span the whole video.
outputDirNoOptional folder for the frames. Defaults to SCREENCAST_HOME/frames/<id>.
timestampsNoExplicit second offsets to grab one frame at each (mode 'timestamps').
returnImagesNoAlso return the frames inline as images the model can view directly (default true). Only the first maxInlineImages frames are embedded.
maxImageWidthNoDownscale inline images to at most this width (default 1280).
sceneThresholdNoMode 'scenes': how much the frame must change to count, 0-1 (default 0.1; raise it to keep only big changes).
maxInlineImagesNoHow many frames to embed inline (default 8, max 20). Every frame is still written to disk and listed by path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.32.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the write side effect (PNG frames written to a folder), the return shape (paths plus inline image frames), and the returnImages toggle. It stops short of stating limits, permissions, or error behavior, which keeps it from 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.

Conciseness5/5

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

Two sentences, front-loaded with the core action before the output/return detail. Every clause earns its place, and the parenthetical toggle hint is compact.

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 an 11-param tool with no output schema, the description adequately explains what is produced (paths on disk plus inline frames) and the key control. It does not cover the 'scenes' mode or maxFrames semantics, but the schema fills those gaps, so the combination is nearly complete.

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 every parameter already carries an inline description; the schema explains modes, dedupe, maxFrames, thresholds, and inline caps thoroughly. The description reinforces only fps, timestamps, and returnImages, 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 (Sample) and resource (frames from a video) and names two selection strategies (fixed fps or explicit timestamps). It is clear what the tool produces, though it never distinguishes itself from likely-functional siblings like contact_sheet or screen_diff, so the agent must infer the boundary.

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 'so the agent can actually view what happened' implies the review use case, and 'disable with returnImages: false' is a small usage hint. But there is no explicit when/when-not guidance and no routing to alternatives such as contact_sheet, screen_diff, or screenshot, leaving selection to inference.

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