get_channel
Retrieve detailed information about a specific streaming channel using its unique ID to access channel settings, configuration, and platform details.
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)MCP server tool handler for 'get_channel': validates the channelId argument, fetches the channel using RestreamClient, serializes to JSON, and returns as 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/restream-client.ts:102-109 (handler)Core handler logic for retrieving a specific channel: makes authenticated GET request to Restream API `/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/index.ts:60-73 (registration)Registration of the 'get_channel' tool in the tools list, including name, description, and JSON input schema.{ 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/types.ts:18-25 (schema)TypeScript interface defining the Channel type returned by get_channel tool.export interface Channel { id: string; platform: string; displayName: string; enabled: boolean; url?: string; isConnected: boolean; }