Skip to main content
Glama

preview_frames

Capture timed sequences of rendered frames to inspect motion and dynamic effects in Douyin AR projects, with optional crop or multiple videos, even when the preview window is backgrounded.

Instructions

按时间连续截取预览画面,分辨率是预览本身的(720×1280,官方截图是缩小后的 320×569),取自预览的渲染结果,窗口在后台或最小化时也能截(截图期间临时恢复正常帧率):默认先重置预览、等到重载后的画面出来,再每隔 interval_ms 截一张,共 count 张(一次最多 24 张),用来看动态效果、摇头时的侧脸等。videos 可依次换几个预览视频各截一组(名称取自 list_preview_videos,如 preview_single_shake_head||女),全部截完切回原视频;切换会让工程变成「已修改」,之后需要 save_project。crop 按画面比例(0–1)裁出局部,如脸部。每帧都存成文件并随结果返回,files 里是路径,可直接贴给用户看;默认存在临时目录、24 小时后删除,save_to(目录的绝对路径)则存到那里长期保留。每帧注明实际截取时刻(相对重置完成的毫秒数)。

Input Schema

NameRequiredDescriptionDefault
cropNo裁剪区域,按画面宽高的比例,左上角为 (0, 0)。
countNo每个视频截几张,默认 4。
resetNo每组截图前先重置预览,默认 true。
videosNo依次使用的预览视频名称(list_preview_videos 返回的 video_name);不给就用当前视频。
save_toNo另存到这个目录(绝对路径,不存在会创建),长期保留。
instance_idNo官方 list_instances 返回的 instance_id,与 project_path 二选一。
interval_msNo相邻两张的间隔(毫秒),默认 700。
project_pathNo目标工程的绝对路径。与 instance_id 二选一;只开了一个工程窗口时都可省略。
tracking_typeNovideos 所属的 tracking_type,如 face、body、hand,默认 face。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses that capture works with the window backgrounded or minimized (temporarily restoring normal frame rate), that it resets the preview and waits for the reloaded frame by default, that switching videos has a side effect (project becomes modified), and that frames land in a temp directory and are deleted after 24 hours unless save_to is given. The only blemish is the stated cap of 24 frames per run, which conflicts with the schema's count maximum of 12 and videos maxItems of 4.

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?

Nearly every clause carries real information — resolution, background capture, reset behavior, side effects, retention, timestamps — with little filler. The weakness is structural: it is one long run-on paragraph with stacked parentheticals rather than being front-loaded into capture behavior, side effects, and output in that order.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter tool with no annotations and no output schema, the description covers the mechanics, side effects, and file retention an agent needs to call it safely. Return-value detail is only loosely sketched (paths in files, per-frame timestamps), which is acceptable given there is no output schema but leaves the exact response shape partly implicit.

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 the baseline would be 3; the description goes further by explaining that crop is ratio-based and typically used to isolate a face, that save_to is the long-term alternative to the 24-hour temp directory, that videos are used one after another and the original is restored at the end, and that each frame carries a timestamp relative to reset completion. It does not mention instance_id/project_path at all, leaving the target-selection semantics entirely to 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?

The description states a specific verb+resource: consecutively capture preview frames at a fixed interval from the preview render output, with the resolution explicitly pinned (720×1280 vs. the official 320×569). It also names the concrete purpose (seeing motion, the side of the face during a head shake), which separates it from static-image siblings like image_view or mobile_preview.

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

Usage Guidelines4/5

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

It gives clear when-to-use context (viewing dynamic effects, side profile while shaking the head) and points at list_preview_videos as the source of the videos names, including a format example. It also warns that switching videos marks the project as modified and requires save_project afterwards. It stops short of stating when NOT to use it, e.g. why you would pick image_view or mobile_preview instead.

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