Skip to main content
Glama

Extract a frame from a file

extract_frame_from_file

Extract a single frame from a video or image file at a chosen time, return it for viewing, and optionally save it as JPEG or PNG.

Instructions

Decode one frame of a video file (or load an image file) and return it as an image so you can look at it, followed by its time, size and saved_path. Optionally saves it as JPEG or PNG. To see a frame of a sequence with its effects use capture_frame instead; for many frames of a file at once use make_contact_sheet_of_file. You get the frame that is on screen at time (the result reports its exact start time); a time at or past the end returns the last frame with a note. Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.

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": {
      "path": "<path>"
    },
    "name": "extract_frame_from_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the media file on this computer.
timeNoPosition of the frame in file time (seconds from the start of the file). Default 0. Ignored for still images.
formatNoImage format when output_path is not given. Default jpeg. With output_path the extension decides.
qualityNoJPEG quality 1-100. Default 90.
max_widthNoScale the frame down to at most this width in pixels, keeping the aspect ratio; never scaled up. Default 1280. Pass the source width for full resolution.
overwriteNoReplace output_path if it already exists. Default false: an existing file makes the tool fail with FILE_EXISTS.
output_pathNoAbsolute path (.jpg, .jpeg or .png) to also save the frame to; missing folders are created. Omit to only look at it.
timeout_secondsNoStop ffmpeg and fail with TIMEOUT after this many seconds. Default 120.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false; the description goes further by naming the failure mode (FFMPEG_NOT_FOUND), the out-of-range time behavior (returns last frame with a note), and that missing folders for output_path are created. It does not mention the FILE_EXISTS/TIMEOUT failure semantics, though those live in the schema parameter descriptions.

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?

Front-loaded with purpose, then alternatives, then timing semantics, then environment prerequisites — a sensible order. The first sentence is somewhat run-on ('so you can look at it, followed by its time, size and saved_path') but no sentence 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?

For an 8-parameter tool with no output schema, the description still explains the return payload (image plus time, size, saved_path) and the runtime dependency. Nothing an agent needs in order to call it correctly is missing.

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 baseline is 3. The description nevertheless adds meaning beyond the schema for the time parameter: the result reports the frame's exact start time and a time at or past the end clamps to the last frame with a note, which the schema does not explain.

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?

States a specific verb and resource ('Decode one frame of a video file'), and names exactly what comes back: the image plus time, size and saved_path. It also explicitly separates itself from capture_frame and make_contact_sheet_of_file, so an agent can pick it without opening another schema.

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

Usage Guidelines5/5

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

Gives explicit routing: use capture_frame for a sequence frame with effects, use make_contact_sheet_of_file for many frames. Adds the key negative condition ('Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed') and the prerequisite (ffmpeg/ffprobe via check_ffmpeg, else FFMPEG_NOT_FOUND).

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

Deploy Server

Other Tools