get_channel_info
Retrieve detailed Twitch channel information including stream status, viewer count, and broadcaster details to monitor or analyze channel performance.
Instructions
チャンネル情報を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channelName | Yes | Twitchチャンネル名 |
Implementation Reference
- src/tools/handlers/channel.ts:4-28 (handler)The handler function that implements the core logic of the get_channel_info tool, fetching user and channel information from Twitch API.export async function handleGetChannelInfo(apiClient: ApiClient, args: { channelName: string }) { const user = await getUserByName(apiClient, args.channelName); const channel = await apiClient.channels.getChannelInfoById(user.id); const response: any = { id: user.id, name: user.name, displayName: user.displayName, description: user.description, profilePictureUrl: user.profilePictureUrl, creationDate: user.creationDate, }; if (channel) { response.channel = { name: channel.name, game: channel.gameName, title: channel.title, language: channel.language, tags: channel.tags, }; } return formatResponse(response); }
- src/tools/definitions.ts:4-17 (schema)The input schema and metadata definition for the get_channel_info tool.{ name: 'get_channel_info', description: 'チャンネル情報を取得します', inputSchema: { type: 'object', properties: { channelName: { type: 'string', description: 'Twitchチャンネル名', }, }, required: ['channelName'], }, },
- src/index.ts:86-89 (registration)Registration and dispatch of the get_channel_info tool handler in the MCP server's CallToolRequestSchema handler.case 'get_channel_info': return await handleGetChannelInfo(this.apiClient, { channelName: args.channelName as string });
- src/index.ts:15-15 (registration)Import of the get_channel_info handler function.import { handleGetChannelInfo, handleGetChatSettings } from './tools/handlers/channel.js';