Skip to main content
Glama
rishipradeep-think41

Google Workspace MCP Server

create_event

Schedule a new calendar event with title, start and end times, location, description, and attendee emails using the Google Workspace MCP Server.

Instructions

Create a new calendar event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attendeesNoList of attendee email addresses
descriptionNoEvent description
endYesEnd time in ISO format
locationNoEvent location
startYesStart time in ISO format
summaryYesEvent title

Implementation Reference

  • The handler function that creates a new calendar event by calling the Google Calendar API's events.insert method with the provided event details, handling errors appropriately.
    private async handleCreateEvent(args: any) { try { const { summary, location, description, start, end, attendees = [], } = args; const event = { summary, location, description, start: { dateTime: start, timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, }, end: { dateTime: end, timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, }, attendees: attendees.map((email: string) => ({ email })), }; const response = await this.calendar.events.insert({ calendarId: "primary", requestBody: event, }); return { content: [ { type: "text", text: `Event created successfully. Event ID: ${response.data.id}`, }, ], }; } catch (error: any) { return { content: [ { type: "text", text: `Error creating event: ${error.message}`, }, ], isError: true, }; } } private async handleUpdateEvent(args: any) {
  • The input schema and metadata (name, description) for the create_event tool, defining required and optional parameters for event creation.
    { name: "create_event", description: "Create a new calendar event", inputSchema: { type: "object", properties: { summary: { type: "string", description: "Event title", }, location: { type: "string", description: "Event location", }, description: { type: "string", description: "Event description", }, start: { type: "string", description: "Start time in ISO format", }, end: { type: "string", description: "End time in ISO format", }, attendees: { type: "array", items: { type: "string" }, description: "List of attendee email addresses", }, }, required: ["summary", "start", "end"], }, },
  • src/index.ts:284-285 (registration)
    The switch case in the CallToolRequestHandler that registers and routes calls to the create_event handler.
    case "create_event": return await this.handleCreateEvent(request.params.arguments);

Other Tools

Related Tools

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/rishipradeep-think41/gsuite-mcp'

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