Skip to main content
Glama

Replace a playlist

livereacting_set_playlist
Destructive

Replace the entire contents of a video or audio playlist layer. The files you send become the whole playlist: anything already in it that you do not send again is removed, and playback restarts from the first item. There is no way to append with this tool. So to add, remove or reorder a video, first call livereacting_get_layer and page through every item until nextOffset is null, apply your change to that complete list, and send the complete list back. Sending only the new video deletes everything else. The response reports removedItemCount and warns whenever the playlist got shorter — check it before telling the customer the change worked. Writes are not merged. If two callers write the same playlist at once, the later write replaces the earlier one and both report success, so do not run parallel edits against one playlist. If the customer may be editing it in the LiveReacting Studio at the same moment, read the list again immediately before writing, and tell them not to edit while you work. Files must have finished importing and encoding. A playlist holds at most 600 items. This tool works on videoPlaylist and audioPlaylist layers only. adPlaceholder sets the video that plays during ad breaks (video playlists only; refused for an audio playlist). It is written together with the full playlist in the same call, so send the complete list with it; leave adPlaceholder out to keep the current one. This is NOT idempotent: sending the same list twice produces the same contents, but each call regenerates every playlistItemId and restarts playback. After a timeout, read the layer with livereacting_get_layer rather than calling again.

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": {
      "projectId": "<projectId>",
      "layerId": "<layerId>",
      "files": "<files>"
    },
    "name": "livereacting_set_playlist"
  }
}

Input Schema

NameRequiredDescriptionDefault
fadeNoVideo playlists only; refused for an audio playlist. true makes each video fade out and the next one fade in, picture and sound. The videos do not overlap, so the playlist keeps its length. Leave it out to keep the current setting.
loopNoRepeat the playlist forever. Refused while the layer auto-switches into another scene, unless the same call also sends autoSwitchToSceneId: null.
filesYesThe COMPLETE playlist in play order. This replaces the current list. An empty array empties the playlist.
volumeNoPlayback volume, 0 to 10.
layerIdYesPlaylist layer id, from livereacting_get_scenes.
crossfadeNoAudio playlists only; refused for a video playlist. true makes the next song start while the last seconds of the current one still play. The two songs overlap, so one loop of the playlist gets shorter by the crossfade at each change. Leave it out to keep the current setting.
projectIdYesProject id, from livereacting_list_projects.
fadeDurationNoVideo playlists only; refused for an audio playlist. Length of the fade in seconds: 0.5, 1, 1.5 or 2. The fade-out and the fade-in each take this long. It has an effect only when fade is true. Leave it out to keep the current setting.
adPlaceholderNoVideo playlists only. The video that plays during ad breaks. Send fileId for one video or files for several. Every file must be a video that has finished importing and encoding. This replaces the whole current setting; null removes it. A new list or order starts again from the first video. Leave it out to keep the current setting.
crossfadeDurationNoAudio playlists only; refused for a video playlist. Length of the crossfade in seconds: 1, 2, 3, 5, 8 or 10. It has an effect only when crossfade is true. Leave it out to keep the current setting.
autoSwitchToSceneIdNoWhat happens when the playlist ends. A scene id (from livereacting_get_scenes) makes it switch to that scene and turns loop off. null removes the switch, so send loop: true with it to make the playlist repeat instead. Leave it out to keep the current setting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / crossfade
      Added value: +{
      +  "description": "Audio playlists only; refused for a video playlist. true makes the next song start while the last seconds of the current one still play. The two songs overlap, so one loop of the playlist gets shorter by the crossfade at each change. Leave it out to keep the current setting.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / crossfadeDuration
      Added value: +{
      +  "description": "Audio playlists only; refused for a video playlist. Length of the crossfade in seconds: 1, 2, 3, 5, 8 or 10. It has an effect only when crossfade is true. Leave it out to keep the current setting.",
      +  "enum": [
      +    1,
      +    2,
      +    3,
      +    5,
      +    8,
      +    10
      +  ],
      +  "type": "number"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / fade
      Added value: +{
      +  "description": "Video playlists only; refused for an audio playlist. true makes each video fade out and the next one fade in, picture and sound. The videos do not overlap, so the playlist keeps its length. Leave it out to keep the current setting.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / fadeDuration
      Added value: +{
      +  "description": "Video playlists only; refused for an audio playlist. Length of the fade in seconds: 0.5, 1, 1.5 or 2. The fade-out and the fade-in each take this long. It has an effect only when fade is true. Leave it out to keep the current setting.",
      +  "enum": [
      +    0.5,
      +    1,
      +    1.5,
      +    2
      +  ],
      +  "type": "number"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / adPlaceholder
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "enabled": {
      +          "description": "true plays a placeholder video during every ad break; false turns it off.",
      +          "type": "boolean"
      +        },
      +        "fileId": {
      +          "description": "One placeholder video, from livereacting_list_media. Ignored when files is sent.",
      +          "pattern": "^[a-fA-F0-9]{24}$",
      +          "type": "string"
      +        },
      +        "files": {
      +          "description": "Several placeholder videos, at most 40, each video once. One video plays per ad break and loops to fill it. When both files and fileId are sent, files wins.",
      +          "items": {
      +            "properties": {
      +              "fileId": {
      +                "pattern": "^[a-fA-F0-9]{24}$",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "fileId"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 40,
      +          "type": "array"
      +        },
      +        "shuffle": {
      +          "description": "false (default) plays the videos in list order. true plays every video once per round, in a new random order each round. It has an effect only with 3 or more videos.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "enabled"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Video playlists only. The video that plays during ad breaks. Send fileId for one video or files for several. Every file must be a video that has finished importing and encoding. This replaces the whole current setting; null removes it. A new list or order starts again from the first video. Leave it out to keep the current setting."
      +}
  4. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description richly extends them: playback restarts from the first item, removedItemCount and a shortening warning come back in the response, concurrent writes are last-writer-wins with both reporting success, and there is a 600-item cap. That is substantial value beyond the annotations, so it sits above a 4 rather than below.

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?

About 250 words, but the core mental model (replace, not append) is front-loaded and the rest is organized by concern: workflow, concurrency, limits, adPlaceholder, idempotency. A couple of sentences restate each other ('There is no way to append' followed by the add/remove/reorder consequence), but for a destructive 11-parameter tool the length is largely earned.

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?

With 11 parameters, destructive semantics, and no output schema, the description covers everything an agent needs: required pre-read, complete-list requirement, result fields and warning, concurrency and timeout handling, size limit, and layer-type restrictions. No material gap remains.

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% and every parameter already documents its 'leave it out to keep the current setting' default, so the baseline would be 3. The description adds cross-parameter meaning the schema does not: adPlaceholder is written together with the full list in the same call, and it is refused on audio playlists. That is real added semantics for a multi-parameter destructive call.

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?

Opens with a specific verb and resource: 'Replace the entire contents of a video or audio playlist layer,' immediately clarifying that the sent files become the whole playlist. It also explicitly disclaims the alternative behavior ('There is no way to append with this tool'), so an agent can distinguish this from an add/insert style operation without opening the schema.

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?

Gives a concrete prerequisite workflow: call livereacting_get_layer, page until nextOffset is null, apply the change locally, send the complete list back. It adds when-not guidance for concurrency (no parallel edits), for simultaneous Studio editing (re-read immediately before writing, warn the customer), and for timeouts (read the layer instead of retrying). Nothing is left to inference.

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.