Skip to main content
Glama

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
NameRequiredDescriptionDefault
summaryYes일정 제목
startYes시작 일시 (YYYY-MM-DDThh:mm:ss)
endYes종료 일시 (YYYY-MM-DDThh:mm:ss)
timeZoneNo타임존 (기본: Asia/Seoul)
descriptionNo일정 설명
locationNo장소
attendeesNo참석자 목록
sendNotificationNo참석자에게 알림 발송 (기본: false)
userIdNo대상 사용자 ID (미지정 시 me)

Implementation Reference

  • 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 }) }],
        };
  • 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)"),
    },
  • The registration of the 'nworks_calendar_create' tool within the MCP server.
    server.tool(
      "nworks_calendar_create",
  • 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) {

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