Skip to main content
Glama

video_audio_bed

Mix looped background music under voice audio with sidechain ducking and loudness normalization; output duration matches the voice source.

Instructions

Mix a looped music bed under a voice source with ducking and loudness normalization.

The voice drives sidechain ducking and loudness normalization. A deterministic AudioBedReceipt is returned, and output duration stays locked to the voice source.

Args: voice_source: Video/audio whose existing audio (voice/dialog) drives ducking and sets output duration. music_path: Background music or ambience to mix underneath; looped when shorter than the voice. output_path: Absolute path for the rendered output file. loop: Loop the music bed when it is shorter than the voice. Default True. loop_crossfade: Crossfade seconds between loop iterations. Default 1.5. fade_in: Output fade-in seconds. Default 0.0. fade_out: Output fade-out seconds. Default 2.2. target_lufs: Loudness normalization target in LUFS. Default -16.0. duck_threshold: Sidechain level above which ducking engages. Default 0.02. duck_ratio: Compression ratio applied while voice plays. Default 5.0. duck_attack: Duck attack in milliseconds. Default 25.0. duck_release: Duck release in milliseconds. Default 450.0. music_volume: Base music level before ducking. Default 1.0. save_receipt: Optional absolute path to write the AudioBedReceipt JSON.

Returns: Dict with success status, output_path, output_duration, ducking_engaged, warnings, elapsed_ms, and the structured receipt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loopNo
fade_inNo
fade_outNo
duck_ratioNo
music_pathYes
duck_attackNo
output_pathYes
target_lufsNo
duck_releaseNo
music_volumeNo
save_receiptNo
voice_sourceYes
duck_thresholdNo
loop_crossfadeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.16.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the output duration is locked to the voice source, that the receipt is deterministic, and that music is looped when short. It omits failure modes and whether the voice source's own audio is preserved in the output, which a mutating render tool should ideally state.

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 purpose sentence, then behavior, then args, then returns – a sensible order with no filler prose. The Returns block partially duplicates the output schema, which is the one place a sentence is not strictly earning its place.

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 14-parameter render tool with no annotations and 0% schema coverage, the description supplies everything an agent needs: semantics for every argument, default values, unit conventions, and the key output invariant (duration locked to voice). The output schema covers return shape, so the extra Returns prose is harmless redundancy rather than a gap.

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% across 14 parameters, and the Args block compensates fully: every parameter gets a meaning, and the numeric ones get units (LUFS, milliseconds, seconds) and defaults (target_lufs -16.0, duck_release 450 ms, fade_out 2.2). This is exactly the compensation a 0%-coverage schema requires.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb (mix) and resource (looped music bed under a voice source) plus the two defining behaviors: ducking and loudness normalization. That distinguishes it from generic siblings like video_mix_audio or video_add_audio, though it never names an alternative explicitly, so the differentiation is inferential rather than stated.

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

Usage Guidelines3/5

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

The description explains mechanics (voice drives ducking, duration locked to voice) but never says when to pick this over video_duck_audio, video_mix_audio, video_normalize_audio, or video_add_audio, nor any prerequisite (e.g., ffmpeg availability, source format constraints). Usage is implied by capability rather than stated.

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

Deploy Server

Other Tools