Skip to main content
Glama

extract_keyframes

Extract representative frames across a video timeline and merge them into a contact-sheet grid with inline base64 so vision models can inspect the whole video at once.

Instructions

Extract multiple representative frames across a video's timeline. In 'montage' mode, merges frames into a single contact-sheet grid image and inlines base64 for vision models to inspect the whole video at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of representative frames to extract across the video timeline. Default: 6.
layoutNoOutput format: 'montage' combines all frames into a single contact-sheet grid image for vision models; 'individual' exports separate frame images. Default: 'montage'.montage
inputPathYesPath to the source video file.
outputPathYesDestination image path (e.g. './keyframes_grid.png' or './frames/frame_%02d.jpg').
includeBase64NoInline base64 image data in response for vision models. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that montage mode merges frames into a contact-sheet grid and inlines base64, but it does not state that the tool writes files, how outputPath is handled, or whether existing files are overwritten.

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?

The description is compact and front-loaded, with the core extraction purpose stated first and the montage/base64 detail following efficiently. It is appropriately sized for a tool with a fully documented schema.

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?

The schema is rich and covers all parameters, and there is no output schema, so the description need not explain return values. However, for a file-producing media tool with no annotations, it should say more about output behavior, individual mode, or file overwrite semantics.

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 the schema already documents all five parameters, including defaults, enum values, and paths. The description reinforces montage mode and base64 usage but does not add new parameter-level meaning beyond the schema.

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?

The description states a specific verb and resource: extract representative frames across a video timeline. It also clarifies the montage behavior, distinguishing it somewhat from a single-thumbnail tool, but it does not explicitly name sibling alternatives such as extract_thumbnail.

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?

Usage is implied through the mention of vision models inspecting the whole video at once, but there is no explicit guidance on when to choose this over extract_thumbnail or when to prefer individual versus montage output.

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