Skip to main content
Glama

search_categories

Find Twitch game categories using search keywords to organize streams and content discovery.

Instructions

ゲームやカテゴリーを検索します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes検索キーワード
limitNo取得する最大カテゴリー数(デフォルト: 20)

Implementation Reference

  • The handler function that performs the search for categories using the Twitch API client and returns formatted results.
    export async function handleSearchCategories( apiClient: ApiClient, args: { query: string; limit?: number } ) { const categories = await apiClient.search.searchCategories(args.query, { limit: args.limit }); return formatResponse( categories.data.map(category => ({ id: category.id, name: category.name, boxArtUrl: category.boxArtUrl, })) ); }
  • The input schema definition for the search_categories tool, specifying required query parameter and optional limit.
    { name: 'search_categories', description: 'ゲームやカテゴリーを検索します', inputSchema: { type: 'object', properties: { query: { type: 'string', description: '検索キーワード', }, limit: { type: 'number', description: '取得する最大カテゴリー数(デフォルト: 20)', minimum: 1, maximum: 100, }, }, required: ['query'], }, },
  • src/index.ts:106-110 (registration)
    The switch case in the main server request handler that routes calls to the search_categories tool to its handler function.
    case 'search_categories': return await handleSearchCategories(this.apiClient, { query: args.query as string, limit: args.limit as number | undefined });
  • src/index.ts:17-17 (registration)
    Import statement that brings in the handleSearchCategories handler function for use in the server.
    import { handleGetTopGames, handleGetGame, handleSearchCategories } from './tools/handlers/game.js';

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