Skip to main content
Glama

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
NameRequiredDescriptionDefault
channelYes채널 channelId

Implementation Reference

  • 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,
          };
        }
      }
    );
  • 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 };
    }

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/yjcho9317/nworks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server