nworks_calendar_create
Create calendar events in LINE WORKS by specifying title, time, and details. Use this tool to schedule meetings or register appointments with attendees and notifications.
Instructions
캘린더 일정을 새로 만듭니다. '회의 잡아줘', '일정 등록해줘' 등의 요청에 사용. User OAuth 인증 필요 (calendar + calendar.read scope)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | 일정 제목 | |
| start | Yes | 시작 일시 (YYYY-MM-DDThh:mm:ss) | |
| end | Yes | 종료 일시 (YYYY-MM-DDThh:mm:ss) | |
| timeZone | No | 타임존 (기본: Asia/Seoul) | |
| description | No | 일정 설명 | |
| location | No | 장소 | |
| attendees | No | 참석자 목록 | |
| sendNotification | No | 참석자에게 알림 발송 (기본: false) | |
| userId | No | 대상 사용자 ID (미지정 시 me) |
Implementation Reference
- src/mcp/tools.ts:251-271 (handler)The MCP tool handler for 'nworks_calendar_create' which maps the input arguments to the calendar API call.
async ({ summary, start, end, timeZone, description, location, attendees, sendNotification, userId, }) => { try { const result = await calendarApi.createEvent({ summary, start, end, timeZone, description, location, attendees, sendNotification, userId: userId ?? "me", }); const event = result.eventComponents?.[0]; return { content: [{ type: "text" as const, text: JSON.stringify({ success: true, eventId: event?.eventId, summary: event?.summary, start: event?.start, end: event?.end }) }], }; - src/mcp/tools.ts:240-250 (schema)The Zod input schema definition for 'nworks_calendar_create'.
{ summary: z.string().describe("일정 제목"), start: z.string().describe("시작 일시 (YYYY-MM-DDThh:mm:ss)"), end: z.string().describe("종료 일시 (YYYY-MM-DDThh:mm:ss)"), timeZone: z.string().optional().describe("타임존 (기본: Asia/Seoul)"), description: z.string().optional().describe("일정 설명"), location: z.string().optional().describe("장소"), attendees: z.array(z.object({ email: z.string(), displayName: z.string().optional() })).optional().describe("참석자 목록"), sendNotification: z.boolean().optional().describe("참석자에게 알림 발송 (기본: false)"), userId: z.string().optional().describe("대상 사용자 ID (미지정 시 me)"), }, - src/mcp/tools.ts:237-238 (registration)The registration of the 'nworks_calendar_create' tool within the MCP server.
server.tool( "nworks_calendar_create", - src/api/calendar.ts:123-174 (handler)The implementation of the calendar event creation function in the API layer.
export async function createEvent( opts: CreateEventOptions ): Promise<{ eventComponents: CalendarEvent[]; organizerCalendarId?: string }> { const userId = opts.userId ?? "me"; const profile = opts.profile ?? "default"; const timeZone = opts.timeZone ?? "Asia/Seoul"; const eventId = generateEventId(); const eventComponent: Record<string, unknown> = { eventId, summary: opts.summary, start: { dateTime: normalizeDateTime(opts.start), timeZone }, end: { dateTime: normalizeDateTime(opts.end), timeZone }, }; if (opts.description) eventComponent.description = opts.description; if (opts.location) eventComponent.location = opts.location; if (opts.transparency) eventComponent.transparency = opts.transparency; if (opts.visibility) eventComponent.visibility = opts.visibility; if (opts.attendees) { eventComponent.attendees = opts.attendees.map((a) => ({ email: a.email, displayName: a.displayName ?? "", partstat: "NEEDS-ACTION", isOptional: false, isResource: false, })); } const body = { eventComponents: [eventComponent], sendNotification: opts.sendNotification ?? false, }; const url = `${BASE_URL}/users/${sanitizePathSegment(userId)}/calendar/events`; if (process.env["NWORKS_VERBOSE"] === "1") { console.error(`[nworks] POST ${url}`); console.error(`[nworks] Body: ${JSON.stringify(body).length} bytes`); } const res = await authedFetch( url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body), }, profile ); if (res.status === 201) {