search_channels
Find Twitch channels by name or keyword to discover streamers and content matching your interests.
Instructions
チャンネルを検索します
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_channels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | 検索キーワード | |
| limit | No | 取得する最大チャンネル数(デフォルト: 20) |
Implementation Reference
- src/tools/handlers/search.ts:4-20 (handler)The handler function that executes the search_channels tool logic by querying the Twitch API for channels matching the search query and formatting the results.
export async function handleSearchChannels( apiClient: ApiClient, args: { query: string; limit?: number } ) { const channels = await apiClient.search.searchChannels(args.query, { limit: args.limit }); return formatResponse( channels.data.map(channel => ({ id: channel.id, name: channel.name, displayName: channel.displayName, game: channel.gameName, language: channel.language, tags: channel.tags, })) ); } - src/index.ts:112-116 (registration)Registers and dispatches the search_channels tool by calling the handleSearchChannels handler in the MCP server request handler.
case 'search_channels': return await handleSearchChannels(this.apiClient, { query: args.query as string, limit: args.limit as number | undefined }); - src/tools/definitions.ts:82-99 (schema)Defines the tool metadata including name, description, and input schema (query string required, optional limit) for search_channels.
name: 'search_channels', description: 'チャンネルを検索します', inputSchema: { type: 'object', properties: { query: { type: 'string', description: '検索キーワード', }, limit: { type: 'number', description: '取得する最大チャンネル数(デフォルト: 20)', minimum: 1, maximum: 100, }, }, required: ['query'], },