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
| Name | Required | Description | Default |
|---|---|---|---|
| folderId | No | 메일 폴더 ID (기본: 0 = 받은편지함) | |
| count | No | 페이지당 항목 수 (기본: 30, 최대: 200) | |
| cursor | No | 페이지네이션 커서 | |
| isUnread | No | 읽지 않은 메일만 조회 | |
| userId | No | 대상 사용자 ID (미지정 시 me) |
Implementation Reference
- src/mcp/tools.ts:556-594 (handler)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, }; } } );