Skip to main content
Glama
ricleedo

Google Services MCP Server

by ricleedo

calendar-create-event

Add new events to Google Calendar with title, time, location, and attendees. Schedule meetings and appointments directly from the Google Services MCP Server.

Instructions

Create a new calendar event. Current time: 1/3/2026, 11:25:51 AM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYesEvent title/summary
descriptionNoEvent description
locationNoEvent location
startDateTimeYesStart date/time in ISO format (e.g., '2025-01-15T09:00:00-07:00')
endDateTimeYesEnd date/time in ISO format (e.g., '2025-01-15T10:00:00-07:00')
attendeesNoArray of attendee email addresses
calendarIdNoCalendar ID - Available options: 'primary' (Primary Calendar)primary
timeZoneNoTime zone - defaults to local time (UTC). Examples: 'America/New_York', 'Europe/London', 'Asia/Tokyo'

Implementation Reference

  • The core handler function that implements the calendar event creation logic using Google Calendar API. It constructs the event object, inserts it via the API, handles attendees, and returns a formatted Markdown response.
    export async function createEvent(
      params: z.infer<ReturnType<typeof createEventSchema>>
    ) {
      try {
        const auth = createCalendarAuth();
        const calendar = google.calendar({ version: "v3", auth });
    
        const event: any = {
          summary: params.summary,
          description: params.description,
          location: params.location,
          start: {
            dateTime: params.startDateTime,
            timeZone: params.timeZone,
          },
          end: {
            dateTime: params.endDateTime,
            timeZone: params.timeZone,
          },
        };
    
        if (params.attendees && params.attendees.length > 0) {
          event.attendees = params.attendees.map((email) => ({ email }));
        }
    
        const response = await calendar.events.insert({
          calendarId: params.calendarId,
          requestBody: event,
          sendUpdates: "all", // Send invitations to attendees
        });
    
        const eventData = {
          id: response.data.id,
          summary: response.data.summary,
          start: response.data.start,
          end: response.data.end,
          location: response.data.location,
          description: response.data.description,
          attendees: response.data.attendees,
          htmlLink: response.data.htmlLink,
        };
    
        return {
          content: [
            {
              type: "text" as const,
              text: `# Event Created Successfully ✅\n\n${formatEventToMarkdown(eventData)}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: `Error creating event: ${
                error instanceof Error ? error.message : String(error)
              }`,
            },
          ],
        };
      }
    }
  • Zod schema defining the input parameters for the createEvent tool, including event details, attendees, calendar ID, and time zone.
    export const createEventSchema = () =>
      z.object({
        summary: z.string().describe("Event title/summary"),
        description: z.string().optional().describe("Event description"),
        location: z.string().optional().describe("Event location"),
        startDateTime: z
          .string()
          .describe(
            "Start date/time in ISO format (e.g., '2025-01-15T09:00:00-07:00')"
          ),
        endDateTime: z
          .string()
          .describe(
            "End date/time in ISO format (e.g., '2025-01-15T10:00:00-07:00')"
          ),
        attendees: z
          .array(z.string())
          .optional()
          .describe("Array of attendee email addresses"),
        calendarId: z
          .string()
          .default("primary")
          .describe(getCalendarDescription()),
        timeZone: z
          .string()
          .optional()
          .describe(
            `Time zone - defaults to local time (${systemTimezone}). Examples: 'America/New_York', 'Europe/London', 'Asia/Tokyo'`
          ),
      });
  • src/index.ts:215-222 (registration)
    MCP server tool registration for 'calendar-create-event', specifying name, description, input schema from createEventSchema, and handler wrapper calling createEvent.
    server.tool(
      "calendar-create-event",
      "Create a new calendar event. Current time: " + new Date().toLocaleString(),
      createEventSchema().shape,
      async (params) => {
        return await createEvent(params);
      }
    );

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/ricleedo/Google-Service-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server