Skip to main content
Glama

Extract a clip's audio onto its own layer

extract_audio

The editor's "Extract Audio": a clip's own audio — the recording's sound on a video clip, or its generated voiceover — becomes a separate audio track (returns music_id), and the clip goes silent.

  • The track starts where the clip starts and plays at normal speed. Shape it with update_audio (trim music_start_time / music_end_time, move guide_start_time, fade, volume); analyze_audio(file_url=) reads it.

  • The track stays in sync through later edits — yours, and voiceover landing on other clips: clips before it moving or resizing, and cuts inside it (split_clip + remove_clip of a part re-cuts the track to what's left; removing a middle part splits it in two). Removing every clip it played under leaves the track where it was; a track you moved or trimmed out of sync stays where you put it.

  • While extracted, the clip's voiceover is locked: voiceover_batch skips it, and an update_clips voiceover_volume on it is not applied (that entry comes back as an error).

  • restore: true gives the clip its own audio back at 100%. The extracted track stays — remove it with remove_from_project(target='audio') if unwanted.

Keep-the-audio, swap-the-visual (e.g. a webinar segment over stock footage):

  1. Cut the recording to the segment(s) with split_clip + remove_clip (before or after extracting).

  2. extract_audio on the clip(s).

  3. Cover, don't delete: add_elements a full-canvas, fully opaque visual on that clip for its whole duration — a stock video (find) with volume 0, an image, or a background shape + text. The recording keeps playing underneath unseen, and the clip's captions still follow the extracted audio's words.

Errors if the clip is already extracted, has no audio (a slide with no generated voiceover), or speech is generating on it.

Concurrency: whole-project mutation — serialize; do not run in parallel with other mutations on the same project_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clip_idNoClip ID (preferred over clip_index).
restoreNotrue = undo: the clip plays its own audio again at 100%.
clip_indexNoZero-based clip index. Ignored if clip_id is provided.
project_idYesThe project ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses sync behavior through later edits (clips moving, cuts, splits), the voiceover lock (voiceover_batch skips it, update_clips voiceover_volume errors), the reversible restore path, and the whole-project mutation concurrency constraint. destructiveHint=false is consistent with a reversible operation, so no contradiction.

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-loads the core action and outcome, then uses tight bullets for editing, sync, locking, restore, workflow, errors, and concurrency. It is long and dense, but nearly every sentence carries operational information an agent needs; minor compression is possible in the sync bullet.

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 complex mutating tool with no output schema, it covers return value (music_id), state changes, side effects on other tools, error conditions, and concurrency. Nothing an agent needs to call it correctly is missing.

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 meaning beyond the schema: restore not only flips audio back to 100% but leaves the extracted track in place (remove separately), and it identifies where the track's src comes from via get_project.audio_tracks. clip_id vs clip_index precedence is left 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?

States a specific verb+resource and the exact resulting state: the clip's audio (recording or voiceover) becomes a separate track and the clip goes silent, returning a music_id. It distinguishes itself from update_audio, analyze_audio, and remove_from_project by naming each and its role, so an agent can route without opening other schemas.

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 explicit when-to-use (the keep-audio/swap-visual workflow as a numbered procedure), when-not-to-expect-success (errors if already extracted, no audio, or speech generating), and the alternatives for adjacent tasks (update_audio to shape, restore to undo, remove_from_project to discard).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.