Skip to main content
Glama

get_chat_settings

Retrieve chat configuration for a Twitch channel to view moderation settings and chat rules.

Instructions

チャット設定を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelNameYesTwitchチャンネル名

Implementation Reference

  • The handler function that implements the core logic: retrieves the Twitch user by channel name, fetches chat settings using the API, and returns a formatted response with settings like emote-only mode, slow mode, etc.
    export async function handleGetChatSettings(apiClient: ApiClient, args: { channelName: string }) {
      const user = await getUserByName(apiClient, args.channelName);
      const settings = await apiClient.chat.getSettings(user.id);
    
      return formatResponse({
        emoteOnlyModeEnabled: settings.emoteOnlyModeEnabled,
        followerOnlyModeEnabled: settings.followerOnlyModeEnabled,
        followerOnlyModeDelay: settings.followerOnlyModeDelay,
        slowModeEnabled: settings.slowModeEnabled,
        slowModeDelay: settings.slowModeDelay,
        subscriberOnlyModeEnabled: settings.subscriberOnlyModeEnabled,
        uniqueChatModeEnabled: settings.uniqueChatModeEnabled,
      });
    }
  • The tool definition including name, description, and input schema requiring a 'channelName' string parameter.
    {
      name: 'get_chat_settings',
      description: 'チャット設定を取得します',
      inputSchema: {
        type: 'object',
        properties: {
          channelName: {
            type: 'string',
            description: 'Twitchチャンネル名',
          },
        },
        required: ['channelName'],
      },
    },
  • src/index.ts:142-145 (registration)
    The switch case in the CallToolRequest handler that routes 'get_chat_settings' calls to the handleGetChatSettings function.
    case 'get_chat_settings':
      return await handleGetChatSettings(this.apiClient, {
        channelName: args.channelName as string
      });
  • src/index.ts:15-15 (registration)
    Import statement that brings the handler function into the main server file for use in tool dispatching.
    import { handleGetChannelInfo, handleGetChatSettings } from './tools/handlers/channel.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