Skip to main content
Glama

detach_audio

Detach a video clip's sound into a standalone audio item on an audio track (like "Detach Audio" in desktop NLEs).

When to use

The user wants a video clip's picture and sound as two independently editable timeline items: offset the sound (J/L cuts), keep audio while replacing the picture, apply audio-only trims/fades, or move the sound to a dedicated audio track.

What it does

For each listed video item, atomically:

  • Inserts a new audio item covering the same timeline range. It plays the same source video's audio track by reference — no file is extracted, and the source's transcript and waveform still apply.

  • Copies the clip's audio-facing settings (volume, audio fades, playback rate, voice-isolation state) onto the new audio item.

  • Places it on the first audio track with free space at that range, creating a new audio track if needed.

  • Marks the video item as detached (audioDetached), which silences it in preview and export.

The audio item's lifetime is bound to the source video asset: deleting the video asset from the media pool also deletes detached audio items that reference it. Deleting just the video item keeps the audio item.

Body shape

{"items": [{"id": "..."}]}

  • id: a video timeline item id (short prefix from preview_timeline accepted).

Constraints

  • Only video items whose source has an audio track; fails if the item's audio was already detached.

  • Locked tracks reject the update with a clear error.

  • There is no re-attach operation. To undo, delete the created audio item and note the video stays silent (audioDetached is not agent-editable).

Return

{"detached": [{"itemId": "<video prefix>", "audioItemId": "<new prefix>", "audioTrackId": "<track prefix>", "createdTrack": false}]}

Examples

  • Detach one clip: {"items": [{"id": "abc123"}]}

  • Detach several clips in one atomic call: {"items": [{"id": "abc123"}, {"id": "def456"}]}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "json": "<json>"
    },
    "name": "detach_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYes{"items":[{"id":"..."}]}
projectIdNoProject for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise.
timelineIdNoTimeline id/prefix (from manage_timelines list) holding every listed item. Edits that timeline without switching the active timeline; defaults to the active timeline.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare it is a non-read-only, non-idempotent, non-destructive write; the description goes far beyond by explaining the atomic per-item behavior, that audio is referenced rather than extracted, that the video item is silenced via audioDetached in preview and export, and that there is no re-attach. It also discloses a lifecycle hazard not implied by any annotation: deleting the source video asset cascades to detached audio items, while deleting the item does not.

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?

Sectioned with headings, front-loaded purpose, and dense bullet points where each bullet carries distinct information. The 'Examples' section is largely redundant with the already-explained body shape, which keeps it from a 5, but there is no filler prose.

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?

There is no output schema, and the description compensates with an explicit 'Return' block showing the detached/audioItemId/audioTrackId/createdTrack shape. Combined with the constraints, body shape, and undo guidance, an agent has everything needed to invoke and interpret the call.

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's bare `{"items":[{"id":"..."}]}` string: it specifies that ids are video timeline item ids and that short prefixes from preview_timeline are accepted, and it clarifies that all listed items must live in one timeline. The projectId/timelineId scoping semantics are 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 and resource ('Detach a video clip's sound into a standalone audio item on an audio track') plus an analogy to a desktop NLE operation. It is immediately distinguishable from siblings like split_item, isolate_voice, or smooth_audio, which touch audio or items but do not create a linked audio item.

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?

The 'When to use' section enumerates concrete intents (J/L cuts, keeping audio while replacing picture, audio-only trims/fades, moving sound to a dedicated track), and 'Constraints' states when it fails (no source audio track, already detached, locked tracks). It stops short of naming a sibling alternative for cases the agent might confuse it with, such as split_item, so it falls just short of a 5.

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.