get_users
Retrieve detailed Twitch user information by providing usernames, enabling profile lookups and data access for channel management.
Instructions
ユーザーの情報を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userNames | Yes | Twitchユーザー名の配列 |
Implementation Reference
- src/tools/handlers/user.ts:4-20 (handler)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, })) ); }
- src/tools/definitions.ts:140-157 (schema)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';