Skip to main content
Glama

Add Music Bed

music_bed
Destructive

Adds background music to a video, looping or trimming it to length, fading, leveling, and mixing with any existing audio while stream-copying the video.

Instructions

Lay music under a video: looped or trimmed to length, faded, leveled, and mixed with any existing audio. Video is stream-copied.

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": {
      "video": "<video>",
      "music": "<music>"
    },
    "name": "music_bed"
  }
}

Input Schema

NameRequiredDescriptionDefault
duckNoDuck the music under the original audio (default false).
musicYesMusic audio file.
videoYesPath to the video.
fadeInNoFade-in seconds (default 1).
outputNoOptional output path. Defaults under SCREENCAST_HOME/edits.
fadeOutNoFade-out seconds (default 2).
overwriteNoAllow replacing an existing file at the output path (default false).
musicVolumeNo0..1 (default 0.25 over existing audio, 0.8 alone).

Output Schema

NameRequiredDescriptionDefault
outputPathYesPath of the file written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.47.0
    • changedInput schema / properties / duck / description
      Previous value: -"Duck the music under the original audio via a sidechain (default false)."New value: +"Duck the music under the original audio (default false)."
    • changedInput schema / properties / fadeIn / description
      Previous value: -"Music fade-in seconds (default 1)."New value: +"Fade-in seconds (default 1)."
    • changedInput schema / properties / fadeOut / description
      Previous value: -"Music fade-out seconds (default 2)."New value: +"Fade-out seconds (default 2)."
    • changedInput schema / properties / music / description
      Previous value: -"Path to the music audio file (looped/trimmed to the video length)."New value: +"Music audio file."
    • changedInput schema / properties / musicVolume / description
      Previous value: -"Music level 0..1 (default 0.25 over existing audio, 0.8 alone)."New value: +"0..1 (default 0.25 over existing audio, 0.8 alone)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "outputPath": {
      +      "description": "Path of the file written.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "outputPath"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.32.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, and the description adds genuinely new behavioral context: the video is stream-copied (no re-encode, fast and lossless for video), and music is looped or trimmed to fit. It does not restate overwrite semantics, which the schema covers, but the stream-copy disclosure is a real behavioral detail an agent would otherwise not know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence, front-loaded with the core action and followed by the transforming operations, with zero filler. Every clause carries information.

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?

With full schema coverage, an output schema, and rich annotations, the description supplies the remaining important context — stream copy and music fitting behavior. Only the interaction between duck and musicVolume defaults is left implicit, a minor gap for an audio-mixing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented with types, defaults, and ranges. The description gestures at the parameters semantically ('faded, leveled', 'mixed with any existing audio' hinting at duck/musicVolume) but adds no format or syntax detail beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource — lay music under a video — and enumerates the operations performed (loop/trim, fade, level, mix). It is clearly distinguishable from siblings like normalize_audio or extract_audio because no sibling performs music-overlay mixing, though it never names a contrasting sibling.

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 implies when the tool applies (adding background music to an existing video) but gives no explicit when-to-use/when-not guidance and no reference to alternatives such as normalize_audio or duck-related options. The agent must infer the selection context from the tool name and purpose alone.

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