Skip to main content
Glama

nworks_mail_list

Retrieve and manage email lists from LINE WORKS inbox with options to filter unread messages, specify folders, and paginate results for efficient mail handling.

Instructions

받은 메일 목록을 조회합니다. '메일 확인해줘', '받은편지함 보여줘', '안 읽은 메일 있어?' 등의 요청에 사용. User OAuth 인증 필요 (mail.read scope)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderIdNo메일 폴더 ID (기본: 0 = 받은편지함)
countNo페이지당 항목 수 (기본: 30, 최대: 200)
cursorNo페이지네이션 커서
isUnreadNo읽지 않은 메일만 조회
userIdNo대상 사용자 ID (미지정 시 me)

Implementation Reference

  • The `nworks_mail_list` tool is registered in `src/mcp/tools.ts`. It takes optional parameters like `folderId`, `count`, `cursor`, `isUnread`, and `userId` and calls the `mailApi.listMails` function to fetch and process the list of emails.
    // Tool 12: 메일 목록 조회
    server.tool(
      "nworks_mail_list",
      "받은 메일 목록을 조회합니다. '메일 확인해줘', '받은편지함 보여줘', '안 읽은 메일 있어?' 등의 요청에 사용. User OAuth 인증 필요 (mail.read scope)",
      {
        folderId: z.number().optional().describe("메일 폴더 ID (기본: 0 = 받은편지함)"),
        count: z.number().optional().describe("페이지당 항목 수 (기본: 30, 최대: 200)"),
        cursor: z.string().optional().describe("페이지네이션 커서"),
        isUnread: z.boolean().optional().describe("읽지 않은 메일만 조회"),
        userId: z.string().optional().describe("대상 사용자 ID (미지정 시 me)"),
      },
      async ({ folderId, count, cursor, isUnread, userId }) => {
        try {
          const result = await mailApi.listMails(
            folderId ?? 0,
            userId ?? "me",
            count ?? 30,
            cursor,
            isUnread
          );
          const mails = result.mails.map((m) => ({
            mailId: m.mailId,
            from: m.from.email,
            subject: m.subject,
            date: m.receivedTime,
            status: m.status,
            attachments: m.attachCount ?? 0,
          }));
          return {
            content: [{ type: "text" as const, text: JSON.stringify({ mails, count: mails.length, totalCount: result.totalCount, unreadCount: result.unreadCount, hasMore: !!result.responseMetaData?.nextCursor, nextCursor: result.responseMetaData?.nextCursor ?? null }) }],
          };
        } catch (err) {
          return {
            content: [{ type: "text" as const, text: mcpErrorHint(err, "mail.list") }],
            isError: true,
          };
        }
      }
    );

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