Skip to main content
Glama
anoopt

Outlook Meetings Scheduler MCP Server

delete-event

Remove a calendar event from Microsoft Outlook by specifying its event ID using the MCP server tool for scheduling and managing meetings.

Instructions

Delete a calendar event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventIdYesID of the event to delete

Implementation Reference

  • The asynchronous handler function that performs the actual deletion of the calendar event using Microsoft Graph API. It checks authentication, retrieves event details, deletes the event, and returns appropriate success or error messages.
    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.` }] }; } // First get the event details to confirm what's being deleted const event = await graph.getEvent(eventId, userEmail); if (!event) { return { content: [ { type: "text", text: "Could not find the event to delete. Please check the event ID.", }, ], }; } // Delete the event const success = await graph.deleteEvent(eventId, userEmail); if (!success) { return { content: [ { type: "text", text: "Failed to delete calendar event. Check the logs for details.", }, ], }; } // Format the result for response const successMessage = `Calendar event deleted successfully! Event ID: ${eventId}`; return { content: [ { type: "text", text: successMessage, }, ], }; }
  • Zod input schema defining the required 'eventId' parameter as a string with description.
    { eventId: z.string().describe("ID of the event to delete"), },
  • Registration of the 'delete-event' tool using registerTool, including name, description, input schema, and inline handler function.
    registerTool( server, "delete-event", "Delete a calendar event", { eventId: z.string().describe("ID of the event to delete"), }, 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.` }] }; } // First get the event details to confirm what's being deleted const event = await graph.getEvent(eventId, userEmail); if (!event) { return { content: [ { type: "text", text: "Could not find the event to delete. Please check the event ID.", }, ], }; } // Delete the event const success = await graph.deleteEvent(eventId, userEmail); if (!success) { return { content: [ { type: "text", text: "Failed to delete calendar event. Check the logs for details.", }, ], }; } // Format the result for response const successMessage = `Calendar event deleted successfully! Event ID: ${eventId}`; return { content: [ { type: "text", text: successMessage, }, ], }; } );

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