Skip to main content
Glama

get_business_appointments

Retrieve scheduled appointments for a Microsoft Bookings business within a specified date range using business ID and optional start/end dates.

Instructions

Get appointments for a Bookings business

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
businessIdYesID of the Bookings business
startDateNoStart date for appointments (ISO format)
endDateNoEnd date for appointments (ISO format)

Implementation Reference

  • The handler function that fetches appointments for a Bookings business using Microsoft Graph API, with optional startDate and endDate filters.
    private async getBusinessAppointments(businessId: string, startDate?: string, endDate?: string) { let api = this.graphClient .api(`/solutions/bookingBusinesses/${businessId}/appointments`); if (startDate || endDate) { const filter = []; if (startDate) filter.push(`start ge ${startDate}`); if (endDate) filter.push(`end le ${endDate}`); api = api.filter(filter.join(' and ')); } const response = await api.get(); return { content: [ { type: 'text', text: JSON.stringify(response.value, null, 2), }, ], }; }
  • Input schema defining parameters for the get_business_appointments tool: businessId (required), startDate and endDate (optional).
    inputSchema: { type: 'object', properties: { businessId: { type: 'string', description: 'ID of the Bookings business', }, startDate: { type: 'string', description: 'Start date for appointments (ISO format)', }, endDate: { type: 'string', description: 'End date for appointments (ISO format)', }, }, required: ['businessId'], },
  • src/index.ts:117-138 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    { name: 'get_business_appointments', description: 'Get appointments for a Bookings business', inputSchema: { type: 'object', properties: { businessId: { type: 'string', description: 'ID of the Bookings business', }, startDate: { type: 'string', description: 'Start date for appointments (ISO format)', }, endDate: { type: 'string', description: 'End date for appointments (ISO format)', }, }, required: ['businessId'], }, },
  • src/index.ts:155-166 (registration)
    Registration of the tool handler in the CallToolRequest switch statement.
    case 'get_business_appointments': { const args = request.params.arguments as { businessId: string; startDate?: string; endDate?: string; }; return await this.getBusinessAppointments( args.businessId, args.startDate, args.endDate ); }

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/DynamicEndpoints/m365-bookings-mcp'

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