Examples
This page collects worked examples of agent flows against the C21 Live Control MCP server. Identifiers in the examples are placeholders — substitute the names and ids of the Live streams, Devices, Encoding groups and Destination groups configured on your instance.
Connecting an MCP client
Any MCP-compatible client connects with the standard bearer header:
Authorization: Bearer <YOUR_API_TOKEN>
The token authenticates as the user it was issued to and inherits that user's role. The tool catalogue advertised on connect reflects the active profile configured on the server (see MCP server).
Example 1: a typical operator query
Operator prompt:
List my Live streams that are currently live, and tell me which ones are degraded.
The agent decomposes the prompt into a single read call:
getLivestreamsStatus({})— returns the runtime status of every Live stream in one call. The agent filters the response client-side onstatus(the integer enum:0stopped,1starting,2running,3error / failed).
Follow-up prompt:
Why is this Live stream broken?
The agent calls, in order:
getLivestreamById({ livestreamId: "<id>" })— fetch the bound Channel, Encoding and Destination.getChannelById({ channelId: "<channel-id>" })— confirm the Channel's configuration.getDevicesLiveStatus({})— confirm the encoder Device is healthy and which Live streams are running on it.
The agent summarises the picture and recommends an action (for example: "the bound Channel has not been receiving frames for 30 seconds; verify the upstream sender").
Example 2: scheduling a recurring Live stream
Operator prompt:
Every weekday at 19:55, start my news bulletin and alert me if it does not go live within 30 seconds.
The agent decomposes the recurring part into a Schedule and the runtime check into a periodic poll:
addSchedule({ name: "news-19h55", livestreamId: "<id>", start: "...", end: "...", recurrence: { type: "workdays" }, enabled: true })— create the recurring Schedule. The Scheduler dispatches the Live stream at the right time.- At 19:55:30, the agent calls
getLivestreamStatus({ livestreamId: "<id>" })and assertsstatus = 2(running). If the call returnsstatus = 0orstatus = 3, the agent issues the alert through whichever notification channel the operator configured.
Example 3: applying a runtime overlay
Operator prompt:
Put the corporate logo on the news Live stream right now.
The agent calls:
listAssets({ fileType: "logos" })— discover available logo assets.runtimeApplyLogo({ livestreamId: "<id>", logo: { filename: "<asset-filename>", position: <position> } })— apply the logo to the running broadcast. The change takes effect on the next encoder keyframe; the Live stream does not stop.
To clear the logo, the agent sends runtimeApplyLogo with an empty filename.
Safety reminder
The active MCP profile gates which tools the connected client can see (see MCP server). The user's role (System Administrator or Operator) gates which operations the underlying API allows. Both checks apply to every call.
When evaluating an unfamiliar agent against a production deployment, start it against the readonly profile and promote to operator or full only after the agent's behaviour has been reviewed.