Skip to main content
Glama

Bind Audio to Sequence

lab_bind_audio
Idempotent

Bind the project's generated audio to a sequence's tracks — ONE call that does both halves of the job, because doing only the first half silently produces a silent film. Half one (POST …/soundmix) creates the four empty tracks (dialog, music, sfx, atmo); half two (POST …/soundmix/resolve-stems) is what actually attaches the audio rows to them. On 2026-08-28 that split cost a complete silent export: the mix looked configured, and every track was empty. From here it is one tool, and it is idempotent — an existing mix is NOT re-initialised (that would throw away volumes, effects and the other tracks' bindings), only re-resolved. Per track it takes the audio row marked selected, otherwise the newest one with a url. Rows still pending have no url and stay unbound. That choice is re-made on every call: generate a second music track and run this again, and the music track follows the NEWER row — unless one row is pinned with selected, which is set in the web UI. With audio_ids the named rows are bound and PINNED, and every track you do NOT name is pinned EMPTY (so an old narrator or sfx row of the project cannot slip into the mix); later automatic resolves, e.g. before a render, keep all of that. A call WITHOUT audio_ids releases every pin and resolves as described above. Changes state, costs nothing. Next: lab_beatgrid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seq_idYesSequence id (from lab_create_sequence/lab_list_sequences) — positive integer as string
audio_idsNoBind EXACTLY these rows instead of the newest/selected one per track, as { music: '12', dialog: '13' }. Named tracks are pinned to these rows, tracks you leave out are pinned empty. Each row must belong to this project, match the track's audio type and have a file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed1 schema field changed
    • addedInput schema / properties / audio_ids
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      }
      +    ]
      +  },
      +  "description": "Bind EXACTLY these rows instead of the newest/selected one per track, as { music: '12', dialog: '13' }. Named tracks are pinned to these rows, tracks you leave out are pinned empty. Each row must belong to this project, match the track's audio type and have a file.",
      +  "propertyNames": {
      +    "enum": [
      +      "dialog",
      +      "music",
      +      "sfx",
      +      "atmo"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give readOnly=false, idempotent=true, destructive=false; the description goes well beyond them by spelling out that an existing mix is NOT re-initialised (protecting volumes/effects/bindings), that rows without a url stay unbound, that pin choices persist across later automatic resolves, and that state changes but costs nothing.

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 with the core purpose, then ordered purpose → two halves → idempotency → selection rule → audio_ids → no-audio_ids → next tool. It is long, and the 2026-08-28 incident sentence is narrative justification rather than call-time information, though it does explain the design.

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 two-parameter mutation tool with no output schema, everything an agent needs is present: required id source, the two operating modes, idempotency guarantees, row-selection rules, and the natural next step.

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 semantics the schema does not carry: unnamed tracks are pinned EMPTY so stale rows cannot slip in, pins survive later automatic resolves, and omitting audio_ids releases every pin. Only the seq_id parameter gets no extra color.

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 ('Bind the project's generated audio to a sequence's tracks') and immediately scopes it against the failure mode of doing only half the job, which cleanly separates it from siblings like lab_list_audio, lab_sfx and lab_mix.

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?

Explicitly says when to call it, what the two internal halves are, when the pinning mode (audio_ids present) vs the resolve mode (audio_ids absent) applies, and names the follow-up tool ('Next: lab_beatgrid'). An agent has no routing ambiguity.

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.

Resources