Skip to main content
Glama

get_global_badges

Retrieve the list of global chat badges available on Twitch to identify and display user achievements and status indicators.

Instructions

グローバルチャットバッジのリストを取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'get_global_badges' tool. It retrieves global chat badges from the Twitch API and formats them into a structured response with badge IDs and version details including titles and image URLs.
    export async function handleGetGlobalBadges(apiClient: ApiClient) { const badges = await apiClient.chat.getGlobalBadges(); return formatResponse( badges.map(badge => ({ id: badge.id, versions: Object.fromEntries( badge.versions.map(version => [ version.id, { title: version.title, imageUrl: version.getImageUrl(1), }, ]) ), })) ); }
  • The schema definition for the 'get_global_badges' tool, specifying its name, description, and input schema (empty object since no parameters are required). This is part of the toolDefinitions array used for MCP tool listing.
    { name: 'get_global_badges', description: 'グローバルチャットバッジのリストを取得します', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:128-129 (registration)
    Registration of the tool handler in the main CallToolRequestSchema switch statement, dispatching calls to 'get_global_badges' to the handleGetGlobalBadges function.
    case 'get_global_badges': return await handleGetGlobalBadges(this.apiClient);
  • src/index.ts:19-19 (registration)
    Import statement bringing in the handleGetGlobalBadges handler function for use in the MCP server.
    import { handleGetGlobalEmotes, handleGetGlobalBadges } from './tools/handlers/chat.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