list_appointments
Retrieve and filter scheduled appointments from Shopmonkey's automotive shop management system by customer, location, date range, or pagination parameters.
Instructions
List appointments from Shopmonkey. Supports filtering and pagination.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | No | Filter appointments by customer ID | |
| locationId | No | Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set. | |
| startDate | No | Filter by start date (ISO 8601 format) | |
| endDate | No | Filter by end date (ISO 8601 format) | |
| limit | No | Maximum number of results to return (default: 25) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/appointments.ts:76-88 (handler)The actual implementation handler for list_appointments.
async list_appointments(args) { const params: Record<string, string> = {}; if (args.customerId !== undefined) params.customerId = String(args.customerId); if (args.locationId !== undefined) params.locationId = String(args.locationId); if (args.startDate !== undefined) params.startDate = String(args.startDate); if (args.endDate !== undefined) params.endDate = String(args.endDate); if (args.limit !== undefined) params.limit = String(args.limit); if (args.page !== undefined) params.page = String(args.page); applyDefaultLocation(params); const data = await shopmonkeyRequest<Appointment[]>('GET', '/appointment', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/appointments.ts:8-22 (schema)The tool schema definition for list_appointments.
{ name: 'list_appointments', description: 'List appointments from Shopmonkey. Supports filtering and pagination.', inputSchema: { type: 'object' as const, properties: { customerId: { type: 'string', description: 'Filter appointments by customer ID' }, locationId: { type: 'string', description: 'Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set.' }, startDate: { type: 'string', description: 'Filter by start date (ISO 8601 format)' }, endDate: { type: 'string', description: 'Filter by end date (ISO 8601 format)' }, limit: { type: 'number', description: 'Maximum number of results to return (default: 25)' }, page: { type: 'number', description: 'Page number for pagination (default: 1)' }, }, }, },