Skip to main content
Glama
peadams21

Google Calendar MCP Server

by peadams21

create_event

Add new events to Google Calendar by specifying title, time, location, attendees, and recurrence rules.

Instructions

Create a new event in Google Calendar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarIdNoCalendar ID (default: 'primary')primary
summaryYesEvent title/summary
descriptionNoEvent description
startYes
endYes
locationNoEvent location
attendeesNoList of attendees
recurrenceNoRecurrence rules (RRULE format)

Implementation Reference

  • The main handler function for the 'create_event' tool. It constructs an event object from the validated arguments and uses the Google Calendar API to insert the new event, returning success or error response.
    async function handleCreateEvent(args: z.infer<typeof CreateEventArgsSchema>) {
      try {
        const event = {
          summary: args.summary,
          description: args.description,
          start: args.start,
          end: args.end,
          location: args.location,
          attendees: args.attendees,
          recurrence: args.recurrence,
        };
    
        const response = await calendar.events.insert({
          calendarId: args.calendarId,
          requestBody: event,
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: true,
                event: response.data,
                message: `Event "${args.summary}" created successfully`,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: false,
                error: error instanceof Error ? error.message : "Unknown error",
              }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Zod schema defining the input parameters for the 'create_event' tool, used for validation before calling the handler.
    const CreateEventArgsSchema = z.object({
      calendarId: z.string().optional().default("primary"),
      summary: z.string(),
      description: z.string().optional(),
      start: z.object({
        dateTime: z.string(),
        timeZone: z.string().optional(),
      }),
      end: z.object({
        dateTime: z.string(),
        timeZone: z.string().optional(),
      }),
      location: z.string().optional(),
      attendees: z.array(z.object({
        email: z.string(),
        displayName: z.string().optional(),
      })).optional(),
      recurrence: z.array(z.string()).optional(),
    });
  • src/index.ts:152-222 (registration)
    Tool registration in the tools array, defining the name, description, and input schema for 'create_event' returned by ListToolsRequestHandler.
      name: "create_event",
      description: "Create a new event in Google Calendar",
      inputSchema: {
        type: "object",
        properties: {
          calendarId: {
            type: "string",
            description: "Calendar ID (default: 'primary')",
            default: "primary",
          },
          summary: {
            type: "string",
            description: "Event title/summary",
          },
          description: {
            type: "string",
            description: "Event description",
          },
          start: {
            type: "object",
            properties: {
              dateTime: {
                type: "string",
                description: "Start date and time (RFC3339 timestamp)",
              },
              timeZone: {
                type: "string",
                description: "Time zone (e.g., 'America/New_York')",
              },
            },
            required: ["dateTime"],
          },
          end: {
            type: "object",
            properties: {
              dateTime: {
                type: "string",
                description: "End date and time (RFC3339 timestamp)",
              },
              timeZone: {
                type: "string",
                description: "Time zone (e.g., 'America/New_York')",
              },
            },
            required: ["dateTime"],
          },
          location: {
            type: "string",
            description: "Event location",
          },
          attendees: {
            type: "array",
            items: {
              type: "object",
              properties: {
                email: { type: "string" },
                displayName: { type: "string" },
              },
              required: ["email"],
            },
            description: "List of attendees",
          },
          recurrence: {
            type: "array",
            items: { type: "string" },
            description: "Recurrence rules (RRULE format)",
          },
        },
        required: ["summary", "start", "end"],
      },
    },
  • src/index.ts:551-554 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that validates arguments using the schema and calls the handleCreateEvent function.
    case "create_event": {
      const validatedArgs = CreateEventArgsSchema.parse(args);
      return await handleCreateEvent(validatedArgs);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic action. It doesn't mention authentication requirements, rate limits, error conditions, what happens when creating duplicate events, or the response format. For a mutation tool with 8 parameters, this is insufficient behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with a clear primary function and gets straight to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 8 parameters, no annotations, no output schema, and complex nested objects, the description is inadequate. It doesn't address behavioral aspects, error handling, response expectations, or provide usage context that would help an agent invoke it correctly in various scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter information beyond what's already in the schema, which has 75% coverage. Since schema coverage is relatively high (>50%), the baseline is 3. The description doesn't compensate for the 25% gap or provide additional context about parameter interactions or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and target resource ('new event in Google Calendar'), making the purpose immediately understandable. However, it doesn't differentiate this from sibling tools like 'update_event' or explain when to use create versus update, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'update_event' or 'list_events'. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/peadams21/Google-Calendar-MCP-Server'

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