nworks_calendar_delete
Delete calendar events in LINE WORKS using event IDs from nworks_calendar_list. Requires user OAuth authentication with calendar scope.
Instructions
캘린더 일정을 삭제합니다. '일정 취소해줘' 등의 요청에 사용. User OAuth 인증 필요 (calendar + calendar.read scope). eventId는 nworks_calendar_list로 조회 가능
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventId | Yes | 삭제할 일정 ID (nworks_calendar_list로 조회 가능) | |
| sendNotification | No | 참석자에게 알림 발송 (기본: false) | |
| userId | No | 대상 사용자 ID (미지정 시 me) |
Implementation Reference
- src/mcp/tools.ts:334-345 (handler)The handler function in src/mcp/tools.ts that implements the tool 'nworks_calendar_delete' by calling calendarApi.deleteEvent.
async ({ eventId, sendNotification, userId }) => { try { await calendarApi.deleteEvent( eventId, userId ?? "me", sendNotification ?? false ); return { content: [{ type: "text" as const, text: JSON.stringify({ success: true, eventId, message: "일정이 삭제되었습니다" }) }], }; } catch (err) { return { - src/api/calendar.ts:263-282 (handler)The underlying API function 'deleteEvent' in src/api/calendar.ts that performs the actual HTTP DELETE request to the Works API.
export async function deleteEvent( eventId: string, userId = "me", sendNotification = false, profile = "default" ): Promise<void> { const params = new URLSearchParams(); params.set("sendNotification", String(sendNotification)); const url = `${BASE_URL}/users/${sanitizePathSegment(userId)}/calendar/events/${sanitizePathSegment(eventId)}?${params.toString()}`; if (process.env["NWORKS_VERBOSE"] === "1") { console.error(`[nworks] DELETE ${url}`); } const res = await authedFetch(url, { method: "DELETE" }, profile); if (res.status === 204) return; if (!res.ok) return handleError(res); } - src/mcp/tools.ts:325-333 (registration)The registration of the 'nworks_calendar_delete' tool including its schema and description.
// Tool 7: 캘린더 일정 삭제 server.tool( "nworks_calendar_delete", "캘린더 일정을 삭제합니다. '일정 취소해줘' 등의 요청에 사용. User OAuth 인증 필요 (calendar + calendar.read scope). eventId는 nworks_calendar_list로 조회 가능", { eventId: z.string().describe("삭제할 일정 ID (nworks_calendar_list로 조회 가능)"), sendNotification: z.boolean().optional().describe("참석자에게 알림 발송 (기본: false)"), userId: z.string().optional().describe("대상 사용자 ID (미지정 시 me)"), },