create_event
Create new calendar events or meetings in Microsoft Outlook by specifying subject, date, time, location, and optional details like attendees or calendar name. Manage events locally with privacy-focused processing.
Instructions
Create a new calendar event or meeting
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attendees | No | Semicolon-separated list of attendee email addresses (optional) | |
| body | No | Event description/body (optional) | |
| calendar | No | Calendar name (optional) | |
| endDate | No | End date in MM/DD/YYYY format (optional, defaults to start date) | |
| endTime | No | End time in HH:MM AM/PM format (optional, defaults to 30 minutes after start time) | |
| isMeeting | No | Whether this is a meeting with attendees (optional, defaults to false) | |
| location | No | Event location (optional) | |
| startDate | Yes | Start date in MM/DD/YYYY format | |
| startTime | Yes | Start time in HH:MM AM/PM format | |
| subject | Yes | Event subject/title |
Implementation Reference
- src/outlookTools.js:118-141 (handler)The handler function for the 'create_event' MCP tool. It calls the createEvent helper from scriptRunner.js, processes the result, and returns a formatted MCP response with success or error content.handler: async (eventDetails) => { try { const result = await createEvent(eventDetails); return { content: [ { type: 'text', text: `Event created successfully with ID: ${result.eventId}` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error creating event: ${error.message}` } ], isError: true }; } } },
- src/outlookTools.js:72-117 (schema)The input schema for the 'create_event' tool, defining properties and requirements for event creation parameters.inputSchema: { type: 'object', properties: { subject: { type: 'string', description: 'Event subject/title' }, startDate: { type: 'string', description: 'Start date in MM/DD/YYYY format' }, startTime: { type: 'string', description: 'Start time in HH:MM AM/PM format' }, endDate: { type: 'string', description: 'End date in MM/DD/YYYY format (optional, defaults to start date)' }, endTime: { type: 'string', description: 'End time in HH:MM AM/PM format (optional, defaults to 30 minutes after start time)' }, location: { type: 'string', description: 'Event location (optional)' }, body: { type: 'string', description: 'Event description/body (optional)' }, isMeeting: { type: 'boolean', description: 'Whether this is a meeting with attendees (optional, defaults to false)' }, attendees: { type: 'string', description: 'Semicolon-separated list of attendee email addresses (optional)' }, calendar: { type: 'string', description: 'Calendar name (optional)' } }, required: ['subject', 'startDate', 'startTime'] },
- src/index.js:34-35 (registration)Registers the Outlook tools, including 'create_event', by calling defineOutlookTools() and storing in this.tools, which is used by MCP request handlers.// Define the tools this.tools = defineOutlookTools();
- src/scriptRunner.js:84-86 (helper)Helper function that executes the underlying 'createEvent.vbs' VBScript file with the provided event details using the general executeScript utility.export async function createEvent(eventDetails) { return executeScript('createEvent', eventDetails); }