Sample Frames
sample_framesExtract representative PNG frames from a video by FPS, timestamps, or scene changes, then return the first few inline so a model can inspect what happened on screen.
Instructions
Sample PNG frames from a video (by fps, timestamps, or scene changes) and return the first few inline so the model can see what happened.
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": {
"input": "<input>"
},
"name": "sample_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second (mode fps). | |
| mode | No | scenes: only frames where the screen changed (strongest first), usually the cheapest review. Default: fps or timestamps, whichever is given. | |
| input | Yes | Path to the source video file. | |
| dedupe | No | Mode fps: drop near-duplicate frames (default false). | |
| maxFrames | No | Frame cap (default 100); fps is lowered to fit while still spanning the video. | |
| outputDir | No | Optional folder for the frames (a relative path resolves under SCREENCAST_HOME/frames). Defaults to SCREENCAST_HOME/frames/<id>. | |
| timestamps | No | Seconds to grab a frame at (mode timestamps). | |
| returnImages | No | Return the first maxInlineImages frames inline (default true). | |
| maxImageWidth | No | Max inline image width (default 1280). | |
| sceneThreshold | No | Mode scenes: change needed to count, 0-1 (default 0.1). | |
| maxInlineImages | No | Frames to embed inline (default 8); all are listed by path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| frames | Yes | ||
| frameDir | Yes | ||
| frameCount | Yes |