nworks_message_members
Retrieve member lists for LINE WORKS channels to identify participants and manage group communications within the nworks platform.
Instructions
특정 채널의 구성원 목록을 조회합니다. '이 채널에 누가 있어?' 등의 요청에 사용. Service Account 인증 사용 (nworks_setup 필요)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | 채널 channelId |
Implementation Reference
- src/mcp/tools.ts:158-177 (handler)Tool registration and handler for nworks_message_members.
server.tool( "nworks_message_members", "특정 채널의 구성원 목록을 조회합니다. '이 채널에 누가 있어?' 등의 요청에 사용. Service Account 인증 사용 (nworks_setup 필요)", { channel: z.string().describe("채널 channelId"), }, async ({ channel }) => { try { const result = await messageApi.listMembers(channel); return { content: [{ type: "text" as const, text: JSON.stringify(result) }], }; } catch (err) { return { content: [{ type: "text" as const, text: mcpErrorHint(err) }], isError: true, }; } } ); - src/api/message.ts:100-119 (handler)Core implementation logic for listing channel members.
export async function listMembers( channelId: string, profile = "default" ): Promise<MemberListResult> { const creds = await loadCredentials(profile); if (!creds.botId) { throw new Error( "Bot ID is required for listing channel members.\n" + "Run `nworks login` with --bot-id flag to set up bot credentials." ); } const result = await request<{ members: string[]; responseMetaData?: { nextCursor?: string } }>({ method: "GET", path: `/bots/${sanitizePathSegment(creds.botId)}/channels/${sanitizePathSegment(channelId)}/members`, profile, }); return { members: result.members ?? [], responseMetaData: result.responseMetaData }; }