Skip to main content
Glama

find_free_slots

Identify open time slots in your Outlook Calendar between specified dates with customizable work hours and duration, ensuring efficient scheduling without data leaving your system.

Instructions

Find available time slots in the calendar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarNoCalendar name (optional)
durationNoDuration in minutes (optional, defaults to 30)
endDateNoEnd date in MM/DD/YYYY format (optional, defaults to 7 days from start date)
startDateYesStart date in MM/DD/YYYY format
workDayEndNoWork day end hour (0-23) (optional, defaults to 17)
workDayStartNoWork day start hour (0-23) (optional, defaults to 9)

Implementation Reference

  • The MCP handler function for the 'find_free_slots' tool. It calls findFreeSlots from scriptRunner.js, formats the result as MCP content, and handles errors.
    handler: async ({ startDate, endDate, duration, workDayStart, workDayEnd, calendar }) => { try { const freeSlots = await findFreeSlots(startDate, endDate, duration, workDayStart, workDayEnd, calendar); return { content: [ { type: 'text', text: JSON.stringify(freeSlots, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error finding free slots: ${error.message}` } ], isError: true }; }
  • Input schema defining the parameters and validation for the 'find_free_slots' tool.
    inputSchema: { type: 'object', properties: { startDate: { type: 'string', description: 'Start date in MM/DD/YYYY format' }, endDate: { type: 'string', description: 'End date in MM/DD/YYYY format (optional, defaults to 7 days from start date)' }, duration: { type: 'number', description: 'Duration in minutes (optional, defaults to 30)' }, workDayStart: { type: 'number', description: 'Work day start hour (0-23) (optional, defaults to 9)' }, workDayEnd: { type: 'number', description: 'Work day end hour (0-23) (optional, defaults to 17)' }, calendar: { type: 'string', description: 'Calendar name (optional)' } }, required: ['startDate'] },
  • Helper function findFreeSlots that executes the underlying VBScript 'findFreeSlots.vbs' via executeScript.
    export async function findFreeSlots(startDate, endDate, duration, workDayStart, workDayEnd, calendar) { return executeScript('findFreeSlots', { startDate, endDate, duration, workDayStart, workDayEnd, calendar }); }
  • src/index.js:35-36 (registration)
    Registration of all tools including 'find_free_slots' by calling defineOutlookTools() and storing in this.tools for use in MCP request handlers.
    this.tools = defineOutlookTools();

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/merajmehrabi/Outlook_Calendar_MCP'

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