Skip to main content
Glama
NOVA-3951

Fastmail Calendar MCP Server

delete_event

DestructiveIdempotent

Remove calendar events from Fastmail by providing the event URL and etag. Confirm deletion with users as this action is permanent and cannot be reversed.

Instructions

PERMANENTLY DELETE an event. PREREQUISITE: You must first call list_calendars, then list_events to get both the eventUrl AND etag. WARNING: This cannot be undone. Always confirm with the user before deleting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventUrlYesREQUIRED. The event URL from list_events output.
etagYesREQUIRED. The etag from list_events output. This prevents accidentally deleting a modified event.

Implementation Reference

  • The switch case handler that executes the delete_event tool. It destructures eventUrl and etag from arguments, handles test mode simulation, and calls davClient.deleteCalendarObject to permanently delete the event from the Fastmail calendar.
    case "delete_event": {
      const { eventUrl, etag } = args as {
        eventUrl: string;
        etag: string;
      };
    
      if (isTestMode) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                _testMode: true,
                _message: "Demo mode - event deletion simulated. No actual event was deleted. Use real Fastmail credentials to delete events.",
                simulatedDelete: { eventUrl, etag },
              }, null, 2),
            },
          ],
        };
      }
    
      await davClient.deleteCalendarObject({
        calendarObject: {
          url: eventUrl,
          etag,
        },
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Event deleted successfully: ${eventUrl}`,
          },
        ],
      };
    }
  • The tool registration including name, description, inputSchema for validation (requiring eventUrl and etag), and annotations indicating it's destructive.
    {
      name: "delete_event",
      description: `PERMANENTLY DELETE an event. PREREQUISITE: You must first call list_calendars, then list_events to get both the eventUrl AND etag. WARNING: This cannot be undone. Always confirm with the user before deleting.`,
      inputSchema: {
        type: "object",
        properties: {
          eventUrl: {
            type: "string",
            description: "REQUIRED. The event URL from list_events output.",
          },
          etag: {
            type: "string",
            description: "REQUIRED. The etag from list_events output. This prevents accidentally deleting a modified event.",
          },
        },
        required: ["eventUrl", "etag"],
      },
      annotations: {
        title: "Delete Event",
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: true,
        openWorldHint: false,
      },
    },
  • src/index.ts:243-419 (registration)
    The delete_event tool is registered here in the ListToolsRequestSchema handler's tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: "list_calendars",
          description: `STEP 1 - ALWAYS CALL THIS FIRST. Lists all calendars in the user's Fastmail account. Returns an array of calendars with displayName (human-readable name like "Work", "Personal", "Family"), url (required for other operations), and timezone. You MUST call this before list_events, create_event, update_event, or delete_event to get the calendar URL. Look at the displayName to identify which calendar the user wants (e.g., "Work" for work schedule, "Personal" for personal events).`,
          inputSchema: {
            type: "object",
            properties: {},
            required: [],
          },
          annotations: {
            title: "List Calendars",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
          },
        },
        {
          name: "list_events",
          description: `STEP 2 - Get events from a calendar. PREREQUISITE: You must first call list_calendars to get the calendarUrl. Returns events within the specified date range. Each event contains: url (needed for update/delete), etag (needed for delete), and data (iCalendar format with SUMMARY=title, DTSTART=start time, DTEND=end time, LOCATION, DESCRIPTION). Parse the iCalendar data to show event details to the user.`,
          inputSchema: {
            type: "object",
            properties: {
              calendarUrl: {
                type: "string",
                description: "REQUIRED. The calendar URL from list_calendars output. Example: 'https://caldav.fastmail.com/dav/calendars/user/example@fastmail.com/default/'",
              },
              startDate: {
                type: "string",
                description: "REQUIRED. Start of date range in ISO format. For today: use current date. Example: '2024-12-01' or '2024-12-01T00:00:00Z'",
              },
              endDate: {
                type: "string",
                description: "REQUIRED. End of date range in ISO format. For a single day, use the next day. Example: '2024-12-02' or '2024-12-31T23:59:59Z'",
              },
            },
            required: ["calendarUrl", "startDate", "endDate"],
          },
          annotations: {
            title: "List Events",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
          },
        },
        {
          name: "get_event_details",
          description: `Get parsed details of a specific event. PREREQUISITE: You must first call list_calendars, then list_events to get the eventUrl. Returns structured event data (title, start, end, location, description) instead of raw iCalendar format.`,
          inputSchema: {
            type: "object",
            properties: {
              eventUrl: {
                type: "string",
                description: "REQUIRED. The event URL from list_events output.",
              },
            },
            required: ["eventUrl"],
          },
          annotations: {
            title: "Get Event Details",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
          },
        },
        {
          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,
          },
        },
        {
          name: "update_event",
          description: `Modify an existing event. PREREQUISITE: You must first call list_calendars, then list_events to get the eventUrl. Only include fields you want to change; omitted fields stay the same.`,
          inputSchema: {
            type: "object",
            properties: {
              eventUrl: {
                type: "string",
                description: "REQUIRED. The event URL from list_events output. Example: 'https://caldav.fastmail.com/dav/calendars/user/.../event.ics'",
              },
              summary: {
                type: "string",
                description: "Optional. New title for the event.",
              },
              description: {
                type: "string",
                description: "Optional. New description/notes for the event.",
              },
              startDate: {
                type: "string",
                description: "Optional. New start time in ISO format.",
              },
              endDate: {
                type: "string",
                description: "Optional. New end time in ISO format.",
              },
              location: {
                type: "string",
                description: "Optional. New location for the event.",
              },
            },
            required: ["eventUrl"],
          },
          annotations: {
            title: "Update Event",
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
          },
        },
        {
          name: "delete_event",
          description: `PERMANENTLY DELETE an event. PREREQUISITE: You must first call list_calendars, then list_events to get both the eventUrl AND etag. WARNING: This cannot be undone. Always confirm with the user before deleting.`,
          inputSchema: {
            type: "object",
            properties: {
              eventUrl: {
                type: "string",
                description: "REQUIRED. The event URL from list_events output.",
              },
              etag: {
                type: "string",
                description: "REQUIRED. The etag from list_events output. This prevents accidentally deleting a modified event.",
              },
            },
            required: ["eventUrl", "etag"],
          },
          annotations: {
            title: "Delete Event",
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: true,
            openWorldHint: false,
          },
        },
      ],
    }));
Behavior5/5

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

While annotations already indicate destructiveHint=true and idempotentHint=true, the description adds crucial behavioral context: it explicitly states 'This cannot be undone' (reinforcing destructiveness), explains the purpose of the etag parameter ('prevents accidentally deleting a modified event'), and provides workflow prerequisites. This goes well 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 perfectly structured with three distinct, front-loaded components: the core action in all caps, prerequisites, and warnings. Every sentence earns its place by providing essential information without redundancy. It's brief yet comprehensive for a dangerous operation.

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

Completeness5/5

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

For a destructive tool with no output schema, the description provides complete context: it explains the irreversible nature, prerequisites, confirmation requirement, and parameter sourcing. Given the high-stakes nature of deletion and the comprehensive annotations, this description leaves no critical gaps for the agent to understand when and how to use this tool safely.

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

Parameters4/5

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

With 100% schema description coverage, the baseline is 3. The description adds value by explaining why both parameters are needed ('You must first call list_calendars, then list_events to get both the eventUrl AND etag') and providing context about their source, which helps the agent understand the required workflow beyond just parameter definitions.

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 ('PERMANENTLY DELETE') and resource ('an event'), distinguishing it from sibling tools like create_event, update_event, and get_event_details. It uses strong, unambiguous language that leaves no doubt about the tool's function.

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 provides explicit prerequisites ('You must first call list_calendars, then list_events to get both the eventUrl AND etag') and clear warnings about when to use it ('Always confirm with the user before deleting'). It also implicitly distinguishes from alternatives like update_event by emphasizing the irreversible nature of deletion.

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