Skip to main content
Glama

Set gain

audio.set_gain
Idempotent

Volume of an audio clip (or a video clip's linked audio) in dB; keyframes ride it up and down. The preview is a waveform of the clip; with preview inline it also carries the measured loudness (preview.loudness), a link preview does not. Returns the new timeline_id (edit that one next), what changed, and where each changed clip now sits.

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": {
      "clip_id": "<clip_id>",
      "gain_db": "<gain_db>",
      "timeline_id": "<timeline_id>"
    },
    "name": "audio.set_gain"
  }
}

Input Schema

NameRequiredDescriptionDefault
clip_idYesAn audio clip, or a video clip whose linked audio to change
gain_dbYesdB, -60 to 24; 0 leaves it as it is. Keyframes make a ride: the first key holds backward to the clip start, so a ride that begins part-way down must also key its starting level at frame 0 or the frames before it are changed too. A key past the clip end is stored as given, with no clamp and no warning. Two keys on one frame are refused
previewNoinline: image in the result; link: URI that renders on read; nonelink
timeline_idYesTimeline handle; every edit returns a new one

Output Schema

NameRequiredDescriptionDefault
parentYesThe version this edit started from
changedYesWhat the edit added, removed or modified; a clip or transition says its track and where it now sits (frames, end exclusive)
clip_idNoThe clip this edit made or acted on (each tool says which)
previewYes
clip_idsNoEvery clip this edit made or acted on, linked ones included (each tool says which)
track_idNo
warningsYes
timeline_idYesThe new version: edit this one next (older ids stay valid)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / changed / description
      Added value: +"What the edit added, removed or modified; a clip or transition says its track and where it now sits (frames, end exclusive)"
    • addedOutput schema / properties / clip_id / description
      Added value: +"The clip this edit made or acted on (each tool says which)"
    • addedOutput schema / properties / clip_ids / description
      Added value: +"Every clip this edit made or acted on, linked ones included (each tool says which)"
    • changedOutput schema / properties / parent / description
      Previous value: -"Timeline handle; every edit returns a new one"New value: +"The version this edit started from"
    • changedOutput schema / properties / timeline_id / description
      Previous value: -"Timeline handle; every edit returns a new one"New value: +"The new version: edit this one next (older ids stay valid)"
  2. Changed1 schema field changed
    • changedInput schema / properties / gain_db / description
      Previous value: -"dB, -60 to 24; 0 leaves it as it is; keyframes for rides"New value: +"dB, -60 to 24; 0 leaves it as it is. Keyframes make a ride: the first key holds backward to the clip start, so a ride that begins part-way down must also key its starting level at frame 0 or the frames before it are changed too. A key past the clip end is stored as given, with no clamp and no warning. Two keys on one frame are refused"
  3. Changed1 schema field changed
    • changedInput schema / $defs / Animatable / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "properties": {
      -      "keyframes": {
      -        "description": "frame is relative to the clip start; ease from video://catalog/eases",
      -        "items": {
      -          "properties": {
      -            "ease": {
      -              "type": "string"
      -            },
      -            "frame": {
      -              "maximum": 100000000,
      -              "minimum": -1000000,
      -              "type": "integer"
      -            },
      -            "value": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "frame",
      -            "value"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "keyframes"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "properties": {
      +      "keyframes": {
      +        "description": "frame is from the clip start; ease shapes the move from this keyframe to the next (default linear; hold waits, then jumps)",
      +        "items": {
      +          "properties": {
      +            "ease": {
      +              "enum": [
      +                "linear",
      +                "hold",
      +                "smooth",
      +                "sine_in",
      +                "sine_out",
      +                "sine_in_out",
      +                "quad_in",
      +                "quad_out",
      +                "quad_in_out",
      +                "cubic_in",
      +                "cubic_out",
      +                "cubic_in_out",
      +                "quart_in",
      +                "quart_out",
      +                "quart_in_out",
      +                "quint_in",
      +                "quint_out",
      +                "quint_in_out",
      +                "expo_in",
      +                "expo_out",
      +                "expo_in_out",
      +                "circ_in",
      +                "circ_out",
      +                "circ_in_out",
      +                "back_in",
      +                "back_out",
      +                "back_in_out",
      +                "elastic_in",
      +                "elastic_out",
      +                "elastic_in_out",
      +                "bounce_in",
      +                "bounce_out",
      +                "bounce_in_out"
      +              ],
      +              "type": "string"
      +            },
      +            "frame": {
      +              "maximum": 100000000,
      +              "minimum": -1000000,
      +              "type": "integer"
      +            },
      +            "value": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "frame",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "keyframes"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare non-readonly, idempotent, non-destructive. The description adds real behavior beyond them: the return carries a new timeline_id that must be used for subsequent edits, plus what changed and where changed clips sit, and preview-mode differences (inline carries measured loudness, link 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?

Three dense sentences with no filler, and the core scoping (clip vs linked audio, dB, keyframes) is front-loaded. The compressed phrasing of the return-value sentence is slightly dense but still readable.

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 an output schema present and full parameter coverage, the description goes beyond the minimum by explaining the follow-up timeline_id requirement and preview behavior. Nothing needed to invoke it correctly appears to be missing.

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 coverage is 100%, so the keyframe, range, and pattern details are already documented in the schema; the description largely restates the keyframe ride concept. It does add the preview.loudness distinction between inline and link modes, which the schema does not spell out, but that is marginal against an already complete schema.

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?

Names the resource and operation precisely: gain in dB on an audio clip or a video clip's linked audio, with keyframed rides. That scope distinguishes it from audio.set_master and audio.set_pan without naming them, though the verb is implied rather than stated directly.

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 clarifies the operating context (linked audio of a video clip, keyframes for rides, edit the returned timeline_id next) but never states when to prefer this over audio.set_master, audio.set_pan, or audio.fade, nor any exclusions. Usage is implied rather than guided.

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.