delete_event
Remove a specific calendar event using its unique ID. The tool integrates with Outlook Calendar MCP to locally manage and delete events directly from Windows systems, ensuring data privacy.
Instructions
Delete a calendar event by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calendar | No | Calendar name (optional) | |
| eventId | Yes | Event ID to delete |
Implementation Reference
- src/outlookTools.js:263-287 (handler)The handler function for the 'delete_event' MCP tool. It receives eventId and optional calendar, calls the deleteEvent helper, and returns a formatted success or error response.handler: async ({ eventId, calendar }) => { try { const result = await deleteEvent(eventId, calendar); return { content: [ { type: 'text', text: result.success ? `Event deleted successfully` : `Failed to delete event` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error deleting event: ${error.message}` } ], isError: true }; } }
- src/outlookTools.js:249-262 (schema)Input schema for the 'delete_event' tool, specifying the required 'eventId' parameter and optional 'calendar'.inputSchema: { type: 'object', properties: { eventId: { type: 'string', description: 'Event ID to delete' }, calendar: { type: 'string', description: 'Calendar name (optional)' } }, required: ['eventId'] },
- src/scriptRunner.js:125-127 (helper)Helper function 'deleteEvent' that invokes the 'deleteEvent.vbs' script execution via executeScript with provided eventId and calendar.export async function deleteEvent(eventId, calendar) { return executeScript('deleteEvent', { eventId, calendar }); }
- src/index.js:34-36 (registration)Registration of the Outlook tools object (including 'delete_event') by calling defineOutlookTools() and storing in this.tools, which is then used in MCP request handlers.// Define the tools this.tools = defineOutlookTools();