Skip to main content
Glama

extract_frame

Idempotent

Extract one video frame at an exact timestamp from the original source at native resolution, with optional crop for focused detail, when stored keyframes miss the moment.

Instructions

Re-extract ONE frame at an exact timestamp from the ORIGINAL source video at native resolution, with an optional crop {x, y, w, h} in source pixels. Use when the stored keyframes miss the instant (they capture scene changes + a 1 fps floor) or when you need full-resolution detail. Slower than get_frames — it decodes the source file, which must still exist at its recorded path (URL jobs keep their downloaded source inside the job, no network). When NOT to use: normal browsing — get_frames serves stored keyframes instantly without touching the source. Examples:

  • keyframes sit at 12:31 and 12:38 but the flash happened at 12:34.5 → extract_frame(job_id, at_ms=754500)

  • extract_frame(job_id="...", at_ms=754500, crop={"x":800,"y":40,"w":400,"h":120}) — zoom into the toast text

  • tiny UI text unreadable in the 1568px keyframe → extract_frame at the same ms for native resolution

  • verify a one-frame glitch: extract_frame at 12300, 12400, 12500 and compare

  • OCR missed small text → extract_frame with a tight crop, then read the returned image

  • crop coordinates are SOURCE pixels (a Retina screen recording may be 2940x1912) — not keyframe scale

  • response JSON carries "path" (absolute) — "save this screenshot next to my docs" = copy from path yourself

  • source file moved or deleted → clear error; stored keyframes via get_frames still work

  • audio-only job → always errors: there is no video stream to decode

  • anti-example: "show me around 5:00" → get_frames(job_id, at_ms=300000); extract_frame is for exact instants

  • anti-example: scanning a range frame by frame → get_frames(start_ms, end_ms) first, refine once after

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cropNo
at_msYes
job_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.4
  2. Removedv0.2.3
  3. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

The annotations only provide idempotentHint, but the description discloses much more: performance cost, source-file dependency, URL-job storage behavior, audio-only failure, error behavior when source is moved or deleted, and the response JSON's 'path' field. No contradiction with annotations.

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?

Long but dense; every block — use cases, not-to-use guidance, examples, anti-examples, caveats — adds operational value. The core purpose is front-loaded, and the detail is justified by the tool's subtle relationship to get_frames.

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 a tool with no output schema, the description covers inputs, failure modes, performance trade-offs, and result handling sufficiently for an agent to select and invoke it correctly. The 'copy from path yourself' note closes a real usage ambiguity.

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 succeeds: at_ms is tied to exact timestamps with concrete ms examples, crop is fully defined with {x, y, w, h} and source-pixel semantics, and job_id is shown in call examples.

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?

Opens with a specific verb ('Re-extract') and precise scope: one frame, exact timestamp, original source video, native resolution, optional crop. The repeated contrast with get_frames makes it unmistakable which sibling tool is meant.

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?

Explicitly states when to use it (keyframes miss the instant, need full-resolution detail) and when not to use it (normal browsing, range scanning), with anti-examples routing to get_frames. This is strong, unambiguous selection guidance.

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