Skip to main content
Glama
NOVA-3951

Fastmail Calendar MCP Server

create_event

Add new events to your Fastmail calendar by specifying title, start/end times, and optional details like location or description.

Instructions

Create a new calendar event. PREREQUISITE: You must first call list_calendars to get the calendarUrl. Creates an event with the specified title, times, and optional description/location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarUrlYesREQUIRED. The calendar URL from list_calendars output where the event will be created.
summaryYesREQUIRED. The event title. Example: 'Team Meeting', 'Doctor Appointment', 'Lunch with Sarah'
descriptionNoOptional. Detailed notes or agenda for the event.
startDateYesREQUIRED. Event start in ISO format. Example: '2024-12-15T10:00:00Z' for 10 AM UTC
endDateYesREQUIRED. Event end in ISO format. Must be after startDate. Example: '2024-12-15T11:00:00Z' for 11 AM UTC
locationNoOptional. Where the event takes place. Example: 'Conference Room A', 'https://zoom.us/j/123', '123 Main St'

Implementation Reference

  • Handler for create_event tool: extracts parameters, handles test mode, validates dates, constructs iCal VEVENT, creates calendar object via davClient.createCalendarObject, returns success message with new event URL.
    case "create_event": {
      const {
        calendarUrl,
        summary,
        description,
        startDate,
        endDate,
        location,
      } = args as {
        calendarUrl: string;
        summary: string;
        description?: string;
        startDate: string;
        endDate: string;
        location?: string;
      };
    
      if (isTestMode) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                _testMode: true,
                _message: "Demo mode - event creation simulated. No actual event was created. Use real Fastmail credentials to create events.",
                simulatedEvent: {
                  summary,
                  description,
                  startDate,
                  endDate,
                  location,
                  url: `https://caldav.fastmail.com/dav/calendars/user/demo@fastmail.com/personal/${Date.now()}.ics`,
                },
              }, null, 2),
            },
          ],
        };
      }
    
      const calendar = calendars.find((cal) => cal.url === calendarUrl);
      if (!calendar) {
        throw new Error(`Calendar not found: ${calendarUrl}`);
      }
    
      const start = new Date(startDate);
      if (isNaN(start.getTime())) {
        throw new Error(`Invalid start date: ${startDate}`);
      }
    
      const end = new Date(endDate);
      if (isNaN(end.getTime())) {
        throw new Error(`Invalid end date: ${endDate}`);
      }
    
      if (end <= start) {
        throw new Error("End date must be after start date");
      }
    
      const uid = `${Date.now()}@fastmail-mcp`;
    
      const icalString = [
        "BEGIN:VCALENDAR",
        "VERSION:2.0",
        "PRODID:-//Fastmail Calendar MCP//EN",
        "BEGIN:VEVENT",
        `UID:${uid}`,
        `DTSTAMP:${formatICalDate(new Date())}`,
        `DTSTART:${formatICalDate(start)}`,
        `DTEND:${formatICalDate(end)}`,
        `SUMMARY:${summary}`,
        description ? `DESCRIPTION:${description}` : "",
        location ? `LOCATION:${location}` : "",
        "END:VEVENT",
        "END:VCALENDAR",
      ]
        .filter(Boolean)
        .join("\r\n");
    
      const result = await davClient.createCalendarObject({
        calendar,
        filename: `${uid}.ics`,
        iCalString: icalString,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Event created successfully: ${summary}\nURL: ${result.url}`,
          },
        ],
      };
    }
  • Zod-like input schema (JSON Schema) defining parameters for create_event: required calendarUrl, summary, startDate, endDate; optional description, location.
    inputSchema: {
      type: "object",
      properties: {
        calendarUrl: {
          type: "string",
          description: "REQUIRED. The calendar URL from list_calendars output where the event will be created.",
        },
        summary: {
          type: "string",
          description: "REQUIRED. The event title. Example: 'Team Meeting', 'Doctor Appointment', 'Lunch with Sarah'",
        },
        description: {
          type: "string",
          description: "Optional. Detailed notes or agenda for the event.",
        },
        startDate: {
          type: "string",
          description: "REQUIRED. Event start in ISO format. Example: '2024-12-15T10:00:00Z' for 10 AM UTC",
        },
        endDate: {
          type: "string",
          description: "REQUIRED. Event end in ISO format. Must be after startDate. Example: '2024-12-15T11:00:00Z' for 11 AM UTC",
        },
        location: {
          type: "string",
          description: "Optional. Where the event takes place. Example: 'Conference Room A', 'https://zoom.us/j/123', '123 Main St'",
        },
      },
      required: ["calendarUrl", "summary", "startDate", "endDate"],
    },
  • src/index.ts:311-351 (registration)
    Tool registration in ListToolsRequestSchema response: defines name, description, inputSchema, and annotations for create_event.
    {
      name: "create_event",
      description: `Create a new calendar event. PREREQUISITE: You must first call list_calendars to get the calendarUrl. Creates an event with the specified title, times, and optional description/location.`,
      inputSchema: {
        type: "object",
        properties: {
          calendarUrl: {
            type: "string",
            description: "REQUIRED. The calendar URL from list_calendars output where the event will be created.",
          },
          summary: {
            type: "string",
            description: "REQUIRED. The event title. Example: 'Team Meeting', 'Doctor Appointment', 'Lunch with Sarah'",
          },
          description: {
            type: "string",
            description: "Optional. Detailed notes or agenda for the event.",
          },
          startDate: {
            type: "string",
            description: "REQUIRED. Event start in ISO format. Example: '2024-12-15T10:00:00Z' for 10 AM UTC",
          },
          endDate: {
            type: "string",
            description: "REQUIRED. Event end in ISO format. Must be after startDate. Example: '2024-12-15T11:00:00Z' for 11 AM UTC",
          },
          location: {
            type: "string",
            description: "Optional. Where the event takes place. Example: 'Conference Room A', 'https://zoom.us/j/123', '123 Main St'",
          },
        },
        required: ["calendarUrl", "summary", "startDate", "endDate"],
      },
      annotations: {
        title: "Create Event",
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: false,
      },
    },
  • Utility function formatICalDate used in create_event handler to format date/time for iCal DTSTART/DTEND/DTSTAMP fields.
    function formatICalDate(date: Date): string {
      return date
        .toISOString()
        .replace(/[-:]/g, "")
        .replace(/\.\d{3}/, "");
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the agent knows this is a non-destructive, non-idempotent write operation. The description adds useful context about the prerequisite (list_calendars) and what fields are created, but doesn't disclose additional behavioral traits like error conditions, rate limits, or authentication requirements beyond what annotations provide.

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 efficiently structured in two sentences: the first states the purpose, the second provides prerequisite and parameter overview. Every sentence earns its place with essential information, and it's appropriately front-loaded with the core functionality.

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

Completeness4/5

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

For a creation tool with no output schema, the description provides good context about prerequisites and parameters. However, it doesn't describe what happens on success (e.g., returns event ID) or failure scenarios. Given the 6 parameters and mutation nature, slightly more behavioral context would be helpful, but the prerequisite guidance is strong.

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?

Schema description coverage is 100%, with each parameter clearly documented in the schema. The description adds marginal value by summarizing the parameters ('title, times, and optional description/location') and mentioning the calendarUrl prerequisite, but doesn't provide additional semantic context beyond what's already in the well-documented schema.

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

Purpose5/5

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

The description clearly states the specific action ('Create a new calendar event') and resource ('calendar event'), distinguishing it from siblings like delete_event, update_event, get_event_details, and list_events. It specifies the core functionality of creating events with title, times, and optional fields.

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

Usage Guidelines5/5

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

The description explicitly provides a prerequisite ('You must first call list_calendars to get the calendarUrl') and distinguishes when to use this tool versus alternatives by naming the specific prerequisite tool. This gives clear guidance on the required sequence of operations.

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/NOVA-3951/Fastmail-Calendar-MCP'

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