Skip to main content
Glama

get_streams

Retrieve live Twitch streams with filters for game, language, and result count to monitor current broadcasts.

Instructions

現在ライブ配信中のストリームを取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gameNoゲーム名でフィルター
languageNo言語でフィルター (例: ja, en)
limitNo取得する最大ストリーム数(デフォルト: 20)

Implementation Reference

  • The handler function that executes the tool logic: fetches live streams filtered by game, language, or limit using Twitch API and maps the response.
    export async function handleGetStreams(
      apiClient: ApiClient,
      args: { game?: string; language?: string; limit?: number }
    ) {
      const streams = await apiClient.streams.getStreams({
        game: args.game,
        language: args.language,
        limit: args.limit,
      });
    
      return formatResponse(
        streams.data.map(stream => ({
          userId: stream.userId,
          userName: stream.userName,
          title: stream.title,
          game: stream.gameName,
          viewers: stream.viewers,
          startedAt: stream.startDate,
          language: stream.language,
          thumbnailUrl: stream.thumbnailUrl,
          tags: stream.tags,
        }))
      );
    }
  • Tool schema definition specifying the name, description, and input schema for get_streams.
      name: 'get_streams',
      description: '現在ライブ配信中のストリームを取得します',
      inputSchema: {
        type: 'object',
        properties: {
          game: {
            type: 'string',
            description: 'ゲーム名でフィルター',
          },
          language: {
            type: 'string',
            description: '言語でフィルター (例: ja, en)',
          },
          limit: {
            type: 'number',
            description: '取得する最大ストリーム数(デフォルト: 20)',
            minimum: 1,
            maximum: 100,
          },
        },
      },
    },
  • src/index.ts:118-123 (registration)
    Registration of the get_streams tool in the main server switch statement, calling the handler with parsed arguments.
    case 'get_streams':
      return await handleGetStreams(this.apiClient, {
        game: args.game as string | undefined,
        language: args.language as string | undefined,
        limit: args.limit as number | undefined
      });

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/mtane0412/twitch-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server