Skip to main content
Glama

update_channel_status

Enable or disable a specific streaming channel to control its broadcast status across multiple platforms like YouTube, Twitch, and Facebook.

Instructions

Enable or disable a specific streaming channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYesThe ID of the channel to update
enabledYesWhether to enable (true) or disable (false) the channel

Implementation Reference

  • MCP server tool handler for 'update_channel_status': validates input arguments, calls RestreamClient.updateChannelStatus, serializes the updated channel to JSON, and returns it in the response format.
    case 'update_channel_status': { if (!args || typeof args.channelId !== 'string' || typeof args.enabled !== 'boolean') { throw new Error('channelId and enabled are required'); } const channel = await restreamClient.updateChannelStatus(args.channelId, args.enabled); return { content: [ { type: 'text', text: JSON.stringify(channel, null, 2), }, ], }; }
  • src/index.ts:74-91 (registration)
    Registers the 'update_channel_status' tool in the MCP tools list with name, description, and input schema definition.
    { name: 'update_channel_status', description: 'Enable or disable a specific streaming channel', inputSchema: { type: 'object', properties: { channelId: { type: 'string', description: 'The ID of the channel to update', }, enabled: { type: 'boolean', description: 'Whether to enable (true) or disable (false) the channel', }, }, required: ['channelId', 'enabled'], }, },
  • Input schema for the 'update_channel_status' tool defining parameters channelId (string) and enabled (boolean).
    inputSchema: { type: 'object', properties: { channelId: { type: 'string', description: 'The ID of the channel to update', }, enabled: { type: 'boolean', description: 'Whether to enable (true) or disable (false) the channel', }, }, required: ['channelId', 'enabled'], },
  • RestreamClient helper method that sends a PATCH request to the Restream API to update the enabled status of a channel and returns the updated Channel object.
    async updateChannelStatus(channelId: string, enabled: boolean): Promise<Channel> { try { const response = await this.axiosInstance.patch<Channel>( `/user/channels/${channelId}`, { enabled } ); return response.data; } catch (error) { throw this.handleError(error, `Failed to update channel ${channelId}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shaktech786/restream-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server