Skip to main content
Glama

Add a layer to an existing scene

livereacting_add_layer
Destructive

Add one layer to a scene that already exists. Three types can be created: "videoPlaylist" and "audioPlaylist", which hold a list of files, and "video", which holds a single file. Text, image and interactive layers are readable with livereacting_get_layer but can only be created in the LiveReacting Studio. Use this to put a playlist into a scene that has none -- for example a scene made by livereacting_manage_scene, or a background music track alongside a video playlist. For a NEW scene and its playlist together use livereacting_create_scene_with_playlist instead; that tool also wires the auto-switch that chains a 24/7 channel. For a video or audio playlist, loop defaults to true; pass loop: false for a clip that must play once. The settings are read strictly by type, and the wrong ones are dropped without an error: a "video" layer ignores files, and a playlist layer ignores fileId. settings.files is optional, so a playlist created without it is created empty; send the files here, or fill the layer afterwards with livereacting_set_playlist. If autoSynch is on and the project is streaming, this copies the full saved project configuration to the running stream. It can overwrite changes made only to the live stream, including settings of existing layers. This is NOT idempotent: calling it twice adds two layers. After a timeout, read the scene with livereacting_get_scenes to see whether the layer arrived, rather than calling again. To change a playlist afterwards use livereacting_set_playlist.

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>",
      "sceneId": "<sceneId>",
      "type": "<type>"
    },
    "name": "livereacting_add_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName for the layer, 19 characters or less. Defaults to a name for the type.
typeYes"videoPlaylist" and "audioPlaylist" play a list of files; "video" plays one file.
sceneIdYesThe scene to add the layer to, from livereacting_get_scenes.
settingsNoWhat the layer plays. The fields differ by type -- see each one.
projectIdYesProject id, from livereacting_list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / settings / properties / crossfade
      Added value: +{
      +  "description": "Type \"audioPlaylist\" only, dropped for the other types. 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. Defaults to false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / settings / properties / crossfadeDuration
      Added value: +{
      +  "description": "Type \"audioPlaylist\" only, dropped for the other types. Length of the crossfade in seconds: 1, 2, 3, 5, 8 or 10. It has an effect only when crossfade is true. Defaults to 3.",
      +  "enum": [
      +    1,
      +    2,
      +    3,
      +    5,
      +    8,
      +    10
      +  ],
      +  "type": "number"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / settings / properties / fade
      Added value: +{
      +  "description": "Types \"videoPlaylist\" and \"video\" only, dropped for \"audioPlaylist\". For a video 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. For a single video: true makes it fade out and back in each time it restarts, and it has an effect only with loop: true. Defaults to false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / settings / properties / fadeDuration
      Added value: +{
      +  "description": "Types \"videoPlaylist\" and \"video\" only, dropped for \"audioPlaylist\". 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. Defaults to 1.",
      +  "enum": [
      +    0.5,
      +    1,
      +    1.5,
      +    2
      +  ],
      +  "type": "number"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / settings / 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": "Type \"videoPlaylist\" only, dropped for the other types. The video that plays during ad breaks: fileId for one video or files for several (at most 40, files wins), with shuffle for a new random order each round. Every file must be a video that has finished importing and encoding."
      +}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive=true and idempotentHint=false, but the description adds substantial context beyond them: autoSynch copies the full saved project configuration to the running stream and can overwrite live-only changes to existing layers, mismatched settings are silently dropped, and after a timeout the agent should verify via livereacting_get_scenes rather than retry. The non-idempotency note is redundant with the annotation but is explained ('calling it twice adds two layers').

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 description is long but front-loaded with the purpose and type restrictions before moving to alternatives, side effects, and recovery. A few sentences restate schema facts (loop defaults, type meanings), which is the main source of avoidable length.

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 destructive, non-idempotent mutation with a deeply nested schema and no output schema, the description covers creation paths, silent setting drops, stream-overwrite risk, and timeout recovery. An agent has enough to call it correctly and safely without guessing.

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; the description earns a bump by explaining the cross-field rules the schema does not state as plainly: settings are read strictly by type and wrong fields are dropped without an error, files is optional so a playlist can be created empty, and loop can be set false for a play-once clip. It does not add much beyond the schema for projectId/sceneId/name.

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 first sentence states a specific verb and resource ('Add one layer to a scene that already exists'), then enumerates exactly which layer types it can create and which it cannot. It explicitly distinguishes itself from livereacting_get_layer, livereacting_create_scene_with_playlist, and livereacting_set_playlist, so an agent can separate it from siblings without opening a 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?

It gives concrete when-to-use cases ('a scene that has none', 'background music alongside a video playlist') and a clear when-not-to: for a new scene plus playlist, use livereacting_create_scene_with_playlist. It also routes follow-up edits to livereacting_set_playlist and states that text/image/interactive layers must be made in the Studio.

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.