Skip to main content
Glama
NOVA-3951

Fastmail Calendar MCP Server

get_event_details

Read-onlyIdempotent

Retrieve structured details for a specific calendar event, including title, time, location, and description, after obtaining the event URL from list_events.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventUrlYesREQUIRED. The event URL from list_events output.

Implementation Reference

  • Handler implementation for the 'get_event_details' tool. Fetches the event by URL from calendars, parses the iCal data using parseICalEvent helper, and returns structured details including url and etag.
    case "get_event_details": {
      const { eventUrl } = args as { eventUrl: string };
    
      if (isTestMode) {
        const mockEvent = MOCK_EVENTS.find(e => e.url === eventUrl) || MOCK_EVENTS[0];
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                _testMode: true,
                _message: "Demo mode - showing sample event. Use real Fastmail credentials for actual data.",
                ...mockEvent,
              }, null, 2),
            },
          ],
        };
      }
    
      let existingEvent: DAVCalendarObject | undefined;
    
      for (const calendar of calendars) {
        const events = await davClient.fetchCalendarObjects({
          calendar,
        });
    
        existingEvent = events.find(
          (e: DAVCalendarObject) => e.url === eventUrl
        );
    
        if (existingEvent) {
          break;
        }
      }
    
      if (!existingEvent) {
        throw new Error(`Event not found: ${eventUrl}`);
      }
    
      const parsedEvent = parseICalEvent(existingEvent.data);
      parsedEvent.url = existingEvent.url;
      parsedEvent.etag = existingEvent.etag;
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(parsedEvent, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including name, description, inputSchema (requiring eventUrl), and annotations for the 'get_event_details' tool, registered in list_tools response.
    {
      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,
      },
    },
  • Helper function parseICalEvent that extracts structured fields (summary, description, location, dates, etc.) from iCalendar data string using regex, called by the get_event_details handler.
    function parseICalEvent(icalData: string): Record<string, any> {
      const result: Record<string, any> = {};
      
      const getField = (fieldName: string): string => {
        const regex = new RegExp(`${fieldName}[^:]*:([^\\r\\n]+)`, "i");
        const match = icalData.match(regex);
        return match ? match[1].trim() : "";
      };
      
      result.summary = getField("SUMMARY") || "Untitled Event";
      result.description = getField("DESCRIPTION") || "";
      result.location = getField("LOCATION") || "";
      result.uid = getField("UID") || "";
      
      const dtstart = getField("DTSTART");
      const dtend = getField("DTEND");
      
      result.startDate = parseICalDate(dtstart);
      result.endDate = parseICalDate(dtend);
      result.startDateRaw = dtstart;
      result.endDateRaw = dtend;
      
      const status = getField("STATUS");
      if (status) result.status = status;
      
      const organizer = getField("ORGANIZER");
      if (organizer) result.organizer = organizer;
      
      return result;
    }
Behavior4/5

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

Annotations already indicate this is a read-only, non-destructive, idempotent operation with a closed world. The description adds valuable context beyond annotations by specifying the prerequisite calls needed and that it returns structured data instead of raw format, which helps the agent understand behavioral constraints not covered by annotations.

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 front-loaded with the core purpose, followed by prerequisite information and output clarification. Every sentence adds value—none are redundant or verbose—making it efficiently structured and easy to parse.

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 read-only tool with good annotations and a simple parameter schema, the description is largely complete. It covers purpose, prerequisites, and output format. However, without an output schema, it could benefit from more detail on the structured data fields (e.g., explicitly listing title, start, end, location, description) to fully compensate for the missing output schema.

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 the eventUrl parameter clearly documented as required and sourced from list_events output. The description reinforces this by mentioning the prerequisite to get the eventUrl from list_events, but doesn't add significant semantic detail beyond what the schema already provides. Baseline 3 is appropriate given high schema coverage.

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 ('Get parsed details') and resource ('a specific event'), distinguishing it from siblings like list_events (which lists events) or create_event (which creates events). It explicitly mentions returning structured event data instead of raw iCalendar format, adding further differentiation.

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 the eventUrl') and clarifies when to use this tool versus alternatives by specifying it's for getting details of a specific event after identifying it through list_events. This gives clear operational context.

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