Skip to main content
Glama

Get video frames

get_video_frames
Read-only

Extract evenly spaced or interval-based frames from an Immich video as image blocks so a model can inspect clips locally; use contact sheets to skim long videos before requesting detailed moments.

Instructions

Get frames of a video as image blocks, to "watch" a clip. Immich keeps one poster per video; this downloads the video and cuts frames locally (PyAV, a dependency since 1.7.1, or ffmpeg on PATH). Every frame is one image for the model. Workflow: 6 frames first; to look closer, narrow with start/end or use interval (down to 1 s). Above 12 frames the tool returns a JSON plan with frames_planned and estimated_tokens instead of images: show it to the user and call again with confirm=true only if they agree. Hard cap 120 per call. For base64 JSON with timestamps use get_video_frames_json. Read-only.

Args:
    asset_id: The video asset's UUID.
    count: Frames evenly spaced over the segment (default 6). Ignored when interval > 0.
    size: 'thumbnail' (250px, ~1.6k tokens per frame) or 'preview' (1440px, ~6.4k). Default 'thumbnail'.
    start: Segment start in seconds (default 0).
    end: Segment end in seconds (0 = to the end).
    interval: One frame every N seconds instead of count (1 = one per second, the maximum granularity).
    confirm: Required (true) when more than 12 frames would be produced; ask the user first.
    sheet: Pack the frames into contact sheets (30 per image, timestamps burned in):
        a long video becomes one or two images instead of dozens, so no
        confirmation is needed. Use it to skim, then cut the moments that matter.

Returns: JPEG image blocks in time order, or JSON (confirmation plan / error).

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": {
      "asset_id": "<asset_id>"
    },
    "name": "get_video_frames"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
sizeNothumbnail
countNo
sheetNo
startNo
confirmNo
asset_idYes
intervalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.1

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered structurally. The description still adds real behavioral context the annotations cannot: local frame extraction via PyAV or ffmpeg, per-frame token costs by size, a hard cap of 120 frames, and a confirmation gate that returns JSON instead of images above 12 frames. That is meaningful added disclosure, though return/error shapes are only loosely characterized.

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 the key action and organized into workflow plus an Args list, with no repeated sentences. A few details, such as "PyAV, a dependency since 1.7.1," are environment trivia that an agent cannot act on, but overall density is justified for an 8-parameter tool.

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?

With 8 parameters, no output schema, and only read-only annotations, the description supplies what is missing: the confirmation flow, expected return types (JPEG blocks or JSON plan/error), cost estimates, and the frame cap. Nothing an agent needs to invoke this correctly and safely is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does: count (evenly spaced, ignored when interval > 0), size with pixel and token costs, start/end semantics including the 0-means-to-end edge case, interval granularity, confirm's trigger condition, and sheet's 30-per-image packing. This is substantially more than the bare titles and defaults in the schema.

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?

"Get frames of a video as image blocks, to 'watch' a clip" names a specific verb, resource, and output form in one sentence. It also explicitly distinguishes itself from the sibling get_video_frames_json ("For base64 JSON with timestamps use get_video_frames_json"), so an agent can route correctly without opening a 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?

Provides an explicit workflow: start at 6 frames, narrow via start/end or switch to interval for finer granularity, and above 12 frames present the JSON plan to the user before calling with confirm=true. It names the alternative tool and the condition that selects it, plus a skim-first strategy via sheet.

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