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
| Name | Required | Description | Default |
|---|---|---|---|
| channelId | Yes | The ID of the channel to retrieve |
Implementation Reference
- src/index.ts:217-230 (handler)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'], }, },
- src/restream-client.ts:102-109 (helper)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}`); } }
- src/types.ts:18-25 (schema)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; }