Skip to main content
Glama

check_appointment_availability

Find available appointment slots for a specific department within your desired date range. Check provider availability and appointment types to schedule patient visits.

Instructions

Check available appointment slots for a department and date range

Input Schema

NameRequiredDescriptionDefault
appointment_typeNoAppointment type (optional)
department_idYesDepartment ID
end_dateYesEnd date (YYYY-MM-DD)
provider_idNoProvider ID (optional - leave empty to check all providers)
start_dateYesStart date (YYYY-MM-DD)

Input Schema (JSON Schema)

{ "properties": { "appointment_type": { "description": "Appointment type (optional)", "type": "string" }, "department_id": { "description": "Department ID", "type": "string" }, "end_date": { "description": "End date (YYYY-MM-DD)", "type": "string" }, "provider_id": { "description": "Provider ID (optional - leave empty to check all providers)", "type": "string" }, "start_date": { "description": "Start date (YYYY-MM-DD)", "type": "string" } }, "required": [ "department_id", "start_date", "end_date" ], "type": "object" }

Implementation Reference

  • The primary handler function that implements the tool logic. It extracts arguments, calls the AthenaHealthClient's getAppointmentAvailability method, formats the JSON response, and handles errors gracefully.
    async handleCheckAppointmentAvailability(args: any) { try { const { department_id, provider_id, appointment_type, start_date, end_date } = args; const availability = await this.client.getAppointmentAvailability({ departmentid: department_id, providerid: provider_id, appointmenttype: appointment_type, startdate: start_date, enddate: end_date, }); return { content: [ { type: 'text' as const, text: JSON.stringify(availability, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text' as const, text: JSON.stringify({ error: 'Failed to check appointment availability', message: error.message || 'Unknown error occurred', details: error.details || error.message, note: 'This endpoint may not be available in the preview/sandbox environment', }, null, 2), }, ], }; } }
  • The tool schema definition specifying the name, description, and input validation schema used by the MCP server.
    { name: 'check_appointment_availability', description: 'Check available appointment slots for a department and date range', inputSchema: { type: 'object', properties: { department_id: { type: 'string', description: 'Department ID' }, provider_id: { type: 'string', description: 'Provider ID (optional - leave empty to check all providers)' }, appointment_type: { type: 'string', description: 'Appointment type (optional)' }, start_date: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, end_date: { type: 'string', description: 'End date (YYYY-MM-DD)' }, }, required: ['department_id', 'start_date', 'end_date'], }, },
  • Registration of the tool in the MCP server's tool call handler switch statement, delegating execution to the ToolHandlers instance.
    case 'check_appointment_availability': return await this.toolHandlers.handleCheckAppointmentAvailability(args);

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/ophydami/Athenahealth-MCP'

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