Skip to main content
Glama

get_users

Retrieve detailed Twitch user information by providing usernames, enabling profile lookups and data access for channel management.

Instructions

ユーザーの情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNamesYesTwitchユーザー名の配列

Implementation Reference

  • The main handler function for the 'get_users' tool. Fetches users by names using Twitch API and returns formatted user details including id, name, display name, etc.
    export async function handleGetUsers(apiClient: ApiClient, args: { userNames: string[] }) { const users = await apiClient.users.getUsersByNames(args.userNames); return formatResponse( users.map(user => ({ id: user.id, name: user.name, displayName: user.displayName, description: user.description, profilePictureUrl: user.profilePictureUrl, offlinePlaceholderUrl: user.offlinePlaceholderUrl, creationDate: user.creationDate, broadcasterType: user.broadcasterType, type: user.type, })) ); }
  • Schema definition for the 'get_users' tool, specifying input as an object with required 'userNames' array of strings (max 100).
    { name: 'get_users', description: 'ユーザーの情報を取得します', inputSchema: { type: 'object', properties: { userNames: { type: 'array', description: 'Twitchユーザー名の配列', items: { type: 'string', }, maxItems: 100, }, }, required: ['userNames'], }, },
  • src/index.ts:131-134 (registration)
    Registration of the 'get_users' tool handler in the switch statement for CallToolRequestSchema, dispatching to handleGetUsers with parsed arguments.
    case 'get_users': return await handleGetUsers(this.apiClient, { userNames: args.userNames as string[] });
  • src/index.ts:20-20 (registration)
    Import statement registering the handleGetUsers function for use in the tool dispatcher.
    import { handleGetUsers } from './tools/handlers/user.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