Skip to main content
Glama

update_channel_status

Enable or disable a specific streaming channel in Restream's multi-platform streaming service. Control channel activation status using channel ID and enable/disable settings.

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

  • Core implementation of the update channel status logic, performing PATCH request to Restream API endpoint /user/channels/{channelId} to toggle enabled status.
    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}`);
      }
    }
  • MCP server tool call handler for 'update_channel_status', validates arguments and delegates to RestreamClient.
    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),
          },
        ],
      };
    }
  • Input schema defining required 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'],
    },
  • src/index.ts:74-91 (registration)
    Registration of the 'update_channel_status' tool in the MCP tools list, including name, description, and input schema.
    {
      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'],
      },
    },

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