Skip to main content
Glama
anoopt

Outlook Meetings Scheduler MCP Server

get-event

Retrieve detailed calendar event information using a specific event ID, enabling efficient management and tracking of Outlook meetings.

Instructions

Get details of a calendar event by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventIdYesID of the event to retrieve

Implementation Reference

  • Executes the 'get-event' tool: authenticates, fetches event from Microsoft Graph API by ID, formats details (subject, times, location, attendees, URL) into markdown text response, handles auth and not-found errors.
    async ({ eventId }) => { const { graph, userEmail, authError } = await getGraphConfig(); if (authError) { return { content: [{ type: "text", text: `🔐 Authentication Required\n\n${authError}\n\nPlease complete the authentication and try again.` }] }; } // Retrieve the event const event = await graph.getEvent(eventId, userEmail); if (!event) { return { content: [ { type: "text", text: "Failed to retrieve the event. The event might not exist or there was an error. Check the logs for details.", }, ], }; } // Format the result for response const eventUrl = event.webLink || "No event URL available"; const startTime = event.start?.dateTime || "No start time available"; const endTime = event.end?.dateTime || "No end time available"; const timeZone = event.start?.timeZone || "No time zone information"; const location = event.location?.displayName || "No location specified"; // Format attendees if they exist let attendeesList = "None"; if (event.attendees && event.attendees.length > 0) { attendeesList = event.attendees.map((a: any) => { const name = a.emailAddress?.name || 'No name'; const email = a.emailAddress?.address || 'No email'; const type = a.type || 'required'; return `${name} (${email}) - ${type}`; }).join("\n "); } const successMessage = ` Calendar event details: Event ID: ${eventId} Subject: ${event.subject || "No subject"} Start: ${startTime} End: ${endTime} Time Zone: ${timeZone} Location: ${location} User: ${userEmail} Attendees: ${attendeesList} Event URL: ${eventUrl} `; return { content: [ { type: "text", text: successMessage, }, ], }; }
  • Input schema using Zod: requires 'eventId' as string.
    { eventId: z.string().describe("ID of the event to retrieve"), },
  • Registers the 'get-event' tool on the MCP server via registerTool, providing name, description, input schema, and handler function.
    registerTool( server, "get-event", "Get details of a calendar event by its ID", { eventId: z.string().describe("ID of the event to retrieve"), }, async ({ eventId }) => { const { graph, userEmail, authError } = await getGraphConfig(); if (authError) { return { content: [{ type: "text", text: `🔐 Authentication Required\n\n${authError}\n\nPlease complete the authentication and try again.` }] }; } // Retrieve the event const event = await graph.getEvent(eventId, userEmail); if (!event) { return { content: [ { type: "text", text: "Failed to retrieve the event. The event might not exist or there was an error. Check the logs for details.", }, ], }; } // Format the result for response const eventUrl = event.webLink || "No event URL available"; const startTime = event.start?.dateTime || "No start time available"; const endTime = event.end?.dateTime || "No end time available"; const timeZone = event.start?.timeZone || "No time zone information"; const location = event.location?.displayName || "No location specified"; // Format attendees if they exist let attendeesList = "None"; if (event.attendees && event.attendees.length > 0) { attendeesList = event.attendees.map((a: any) => { const name = a.emailAddress?.name || 'No name'; const email = a.emailAddress?.address || 'No email'; const type = a.type || 'required'; return `${name} (${email}) - ${type}`; }).join("\n "); } const successMessage = ` Calendar event details: Event ID: ${eventId} Subject: ${event.subject || "No subject"} Start: ${startTime} End: ${endTime} Time Zone: ${timeZone} Location: ${location} User: ${userEmail} Attendees: ${attendeesList} Event URL: ${eventUrl} `; return { content: [ { type: "text", text: successMessage, }, ], }; } );
  • src/index.ts:34-34 (registration)
    Top-level registration call in main server file, invoking registerEventReadTools which includes 'get-event' tool.
    registerEventReadTools(server);
  • Shared helper function providing Microsoft Graph client, user email, and auth error status, used by the handler for API access.
    export async function getGraphConfig() {

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/anoopt/outlook-meetings-scheduler-mcp-server'

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