Skip to main content
Glama

cut a clip's face track

transcriptions_slice-speaker-face-track
Destructive

Cuts a matched speaker's face track to a lipsync clip's frame range and returns a public JSON URL of per-frame face boxes for speaker.faceTrackUrl, so the clip lip-syncs exactly that person.

Instructions

Cut one matched speaker's face track to the frames of one lipsync_create-timeline clip and return {url}: a public JSON file of per-frame face boxes to pass as that clip's speaker.faceTrackUrl, so the clip lipsyncs exactly that person. Use it after transcriptions_get-speaker-analysis reports the speaker matched; not for uncertain speakers (a 422 error), whose clips use speaker detect or a point on the face instead. Frames are [startFrame, endFrame) counted from the first frame of the source file, not of the transcription window, and the track is resampled by time onto your fps. Each call writes a new file and returns a new url; it is free, 60 calls a minute. url is null, and no file is written, when the face is on none of those frames: use detect for that clip, or keep it unlipsynced with lipsync: false where lipsync_create-timeline offers that field. A changed transcript revision is a 409 error: read the analysis again.

Input Schema

NameRequiredDescriptionDefault
idYesTranscription id from transcriptions_create.
fpsYesFrame rate of the video the timeline lipsyncs, as assets_get-playback-metadata reports it; the face track is resampled by time onto this grid.
skipNoOptional range { startFrame, endFrame } (end exclusive) strictly inside the clip that a cut removed from its footage. Those frames are left out of the file, so it keeps one box per remaining frame. Usually omitted.
endFrameYesFrame after the clip ends (exclusive): the timeline clip endFrame + 1.
revisionYesThe revision returned by transcriptions_get-speaker-analysis, so the call matches that analysis.
speakerIdYesA matched speaker id from transcriptions_get-speaker-analysis.
startFrameYesFirst frame of the clip, inclusive, counted from the first frame of the source file: the timeline clip's startFrame.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.4
    • changedInput schema / properties / fps / description
      Previous value: -"The source video's frame rate."New value: +"Frame rate of the video the timeline lipsyncs, as assets_get-playback-metadata reports it; the face track is resampled by time onto this grid."
    • changedInput schema / properties / skip / description
      Previous value: -"Optional frame range inside the clip, { startFrame, endFrame }, to leave without boxes."New value: +"Optional range { startFrame, endFrame } (end exclusive) strictly inside the clip that a cut removed from its footage. Those frames are left out of the file, so it keeps one box per remaining frame. Usually omitted."
    • changedInput schema / properties / startFrame / description
      Previous value: -"First frame of the clip, inclusive."New value: +"First frame of the clip, inclusive, counted from the first frame of the source file: the timeline clip's startFrame."
  2. Changed7 schema fields changed
    • addedInput schema / properties / endFrame / description
      Added value: +"Frame after the clip ends (exclusive): the timeline clip endFrame + 1."
    • addedInput schema / properties / fps / description
      Added value: +"The source video's frame rate."
    • addedInput schema / properties / id / description
      Added value: +"Transcription id from transcriptions_create."
    • addedInput schema / properties / revision / description
      Added value: +"The revision returned by transcriptions_get-speaker-analysis, so the call matches that analysis."
    • addedInput schema / properties / skip / description
      Added value: +"Optional frame range inside the clip, { startFrame, endFrame }, to leave without boxes."
    • addedInput schema / properties / speakerId / description
      Added value: +"A matched speaker id from transcriptions_get-speaker-analysis."
    • addedInput schema / properties / startFrame / description
      Added value: +"First frame of the clip, inclusive."
  3. Addedv0.1.5

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations it discloses the cost profile ('it is free, 60 calls a minute'), the side effect ('each call writes a new file and returns a new url', i.e. no overwrite despite destructiveHint), the null/no-file outcome, and two failure modes (422 for uncertain speakers, 409 for a changed transcript revision). What is missing is only the shape of the produced file beyond 'per-frame face boxes'.

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 and primary return value, then constraints, then error paths — a sensible order with no filler sentences. It runs long and repeats the frame-origin rule that the schema already states for startFrame/endFrame, which keeps it just short of exemplary.

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 seven-parameter, non-idempotent, open-world write tool with no output schema, the description covers purpose, prerequisite, return value, null case, rate limit and both error codes. An agent could call it and handle its outcomes correctly without further documentation.

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 is 3, but the description adds real semantics: the frame range is half-open, counted from the first frame of the source file rather than the transcription window, and the track is resampled by time onto the caller's fps. The optional 'skip' parameter is still only explained 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?

States a specific verb and resource ('Cut one matched speaker's face track to the frames of one lipsync_create-timeline clip') and names the exact return artifact ({url} JSON of per-frame face boxes for speaker.faceTrackUrl). That is enough to tell it apart from transcriptions_get-speaker-analysis and from the 'speaker detect' alternative 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?

Gives an explicit prerequisite ('Use it after transcriptions_get-speaker-analysis reports the speaker matched'), an explicit exclusion ('not for uncertain speakers (a 422 error)') and the alternative to use instead ('speaker detect or a point on the face'). It also handles the empty-result branch by naming the fallbacks (detect, or lipsync: false).

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