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. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
projectIdYesProject id, from livereacting_list_projects.
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. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well beyond: it explains the destructive mechanism (omitted items are removed), that playback restarts, that it is non-idempotent because playlistItemIds regenerate, the 600-item cap, the import/encode precondition, and last-write-wins behavior under concurrency. It also discloses the response signals (removedItemCount, shorter-playlist warning) with no output schema present.

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?

The core replace semantics are front-loaded in the first two sentences, and nearly every sentence carries a distinct operational rule (concurrency, limits, preconditions, recovery). It is long by absolute standards and repeats the deletion consequence twice ('anything already in it that you do not send again is removed' and 'Sending only the new video deletes everything else'), so a small deduction for redundancy.

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 no output schema, the description carries the return-value burden and does so (removedItemCount, warning when the playlist shortens). For a destructive, non-idempotent, concurrent-write-prone operation it covers limits, preconditions, race conditions, and failure recovery — everything needed to invoke it safely.

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 description coverage is 100%, so the baseline is 3, and loop/volume/autoSwitchToSceneId are not discussed in prose. However, the description adds operational meaning around the dominant 'files' parameter — that the array becomes the whole playlist, that omission means deletion, that playback restarts from item one — which the schema states more terseley. This is meaningful reinforcement beyond structured data.

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?

The description names a precise verb+resource: 'Replace the entire contents of a video or audio playlist layer,' and immediately scopes it down ('videoPlaylist and audioPlaylist layers only'). It distinguishes itself from any append-style operation ('There is no way to append with this tool'), which is exactly the distinction an agent needs against siblings like livereacting_create_scene_with_playlist.

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?

Explicit when-and-how: read the full list first via livereacting_get_layer and page until nextOffset is null, apply the change, send the complete list back. It warns against the naive alternative ('Sending only the new video deletes everything else'), states the concurrency rule (no parallel edits against one playlist), and covers the Studio co-editing case and post-timeout recovery. 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.