book_appointment
Schedule appointments for custom framing services, art consultations, or workshop registrations at the art supply store.
Instructions
Schedule a new appointment for custom framing, consultations, or workshops.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerName | Yes | Customer name | |
| date | Yes | Date in YYYY-MM-DD format | |
| service | Yes | Service type: framing, consultation, workshop | |
| time | Yes | Time in HH:MM format |
Implementation Reference
- src/index.ts:260-273 (schema)Input schema for the book_appointment tool, defining parameters: customerName, service, date, time.{ name: 'book_appointment', description: 'Schedule a new appointment for custom framing, consultations, or workshops.', inputSchema: { type: 'object', properties: { customerName: { type: 'string', description: 'Customer name' }, service: { type: 'string', description: 'Service type: framing, consultation, workshop' }, date: { type: 'string', description: 'Date in YYYY-MM-DD format' }, time: { type: 'string', description: 'Time in HH:MM format' }, }, required: ['customerName', 'service', 'date', 'time'], }, },
- src/index.ts:905-928 (handler)Handler function that processes the book_appointment tool call: creates a new appointment entry in the mock storeData.appointments array and returns a confirmation message.case 'book_appointment': { const customerName = String(args?.customerName || ''); const service = String(args?.service || ''); const date = String(args?.date || ''); const time = String(args?.time || ''); const newApt = { id: `APT${String(storeData.appointments.length + 1).padStart(3, '0')}`, customerName, service, date, time, duration: service.toLowerCase().includes('workshop') ? '2 hours' : '30 min' }; storeData.appointments.push(newApt); return { content: [{ type: 'text', text: `✅ Appointment Booked!\n\n📅 ${date} at ${time}\n👤 ${customerName}\n🎨 Service: ${service}\n⏱️ Duration: ${newApt.duration}\n🎫 Confirmation: ${newApt.id}` }] }; }
- src/index.ts:516-518 (registration)Registration of the ListToolsRequestHandler which exposes the book_appointment tool in the tools list.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });