Skip to main content
Glama

get_game

Retrieve detailed information about a specific Twitch game by providing its name. This tool accesses the Twitch API to fetch game data for analysis or integration purposes.

Instructions

特定のゲームの情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesゲーム名

Implementation Reference

  • Handler function that implements the get_game tool by fetching game details from Twitch API using the game name.
    export async function handleGetGame(apiClient: ApiClient, args: { name: string }) { const game = await apiClient.games.getGameByName(args.name); if (!game) { throw new McpError(ErrorCode.InvalidParams, `Game "${args.name}" not found`); } return formatResponse({ id: game.id, name: game.name, boxArtUrl: game.boxArtUrl, }); }
  • Tool schema definition for get_game, specifying input as object with required 'name' string.
    { name: 'get_game', description: '特定のゲームの情報を取得します', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'ゲーム名', }, }, required: ['name'], }, },
  • src/index.ts:101-104 (registration)
    Registration of the get_game tool handler in the switch statement for CallToolRequest.
    case 'get_game': return await handleGetGame(this.apiClient, { name: args.name as string });

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