Skip to main content
Glama

get_channel

Retrieve detailed information about a specific streaming channel by its ID to manage multi-platform streaming across YouTube, Twitch, and Facebook.

Instructions

Get detailed information about a specific channel by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYesThe ID of the channel to retrieve

Implementation Reference

  • The MCP server request handler for the 'get_channel' tool. Validates the channelId argument, calls RestreamClient.getChannel(), and formats the response as JSON text content.
    case 'get_channel': { if (!args || typeof args.channelId !== 'string') { throw new Error('channelId is required'); } const channel = await restreamClient.getChannel(args.channelId); return { content: [ { type: 'text', text: JSON.stringify(channel, null, 2), }, ], }; }
  • src/index.ts:60-73 (registration)
    Tool registration in the MCP tools list, defining name, description, and input schema (requiring channelId string).
    { name: 'get_channel', description: 'Get detailed information about a specific channel by ID', inputSchema: { type: 'object', properties: { channelId: { type: 'string', description: 'The ID of the channel to retrieve', }, }, required: ['channelId'], }, },
  • RestreamClient helper method that performs the actual API request to retrieve channel details from Restream's /user/channels/{channelId} endpoint.
    async getChannel(channelId: string): Promise<Channel> { try { const response = await this.axiosInstance.get<Channel>(`/user/channels/${channelId}`); return response.data; } catch (error) { throw this.handleError(error, `Failed to fetch channel ${channelId}`); } }
  • TypeScript interface defining the structure of the Channel object returned by the getChannel method.
    export interface Channel { id: string; platform: string; displayName: string; enabled: boolean; url?: string; isConnected: boolean; }

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