nworks_calendar_list
Retrieve calendar events and schedules from LINE WORKS for specified time periods to manage appointments and plan activities.
Instructions
사용자의 캘린더 일정/스케줄을 조회합니다. '오늘 일정 알려줘', '이번 주 스케줄 확인' 등의 요청에 사용. User OAuth 인증 필요 (calendar.read scope). 미로그인 시 nworks_login_user로 로그인 필요
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromDateTime | Yes | 시작 일시 (YYYY-MM-DDThh:mm:ss+09:00) | |
| untilDateTime | Yes | 종료 일시 (YYYY-MM-DDThh:mm:ss+09:00) | |
| userId | No | 대상 사용자 ID (미지정 시 me) |
Implementation Reference
- src/mcp/tools.ts:199-234 (handler)The 'nworks_calendar_list' tool handler implementation. It uses 'calendarApi.listEvents' to fetch events and formats them for the MCP client.
// Tool 4: 캘린더 일정 목록 server.tool( "nworks_calendar_list", "사용자의 캘린더 일정/스케줄을 조회합니다. '오늘 일정 알려줘', '이번 주 스케줄 확인' 등의 요청에 사용. User OAuth 인증 필요 (calendar.read scope). 미로그인 시 nworks_login_user로 로그인 필요", { fromDateTime: z.string().describe("시작 일시 (YYYY-MM-DDThh:mm:ss+09:00)"), untilDateTime: z.string().describe("종료 일시 (YYYY-MM-DDThh:mm:ss+09:00)"), userId: z.string().optional().describe("대상 사용자 ID (미지정 시 me)"), }, async ({ fromDateTime, untilDateTime, userId }) => { try { const result = await calendarApi.listEvents( fromDateTime, untilDateTime, userId ?? "me" ); const events = result.events.flatMap((e) => e.eventComponents.map((c) => ({ eventId: c.eventId, summary: c.summary, start: c.start.dateTime ?? c.start.date ?? "", end: c.end.dateTime ?? c.end.date ?? "", location: c.location ?? "", })) ); return { content: [{ type: "text" as const, text: JSON.stringify({ events, count: events.length }) }], }; } catch (err) { return { content: [{ type: "text" as const, text: mcpErrorHint(err, "calendar.list") }], isError: true, }; } } );