get_available_slots
Find available time slots for booking services at a specific location and date, displaying times, capacity, pricing, and activity types.
Instructions
Get available session time slots for a location on a given date. Returns times, capacity, pricing, and activity type. Works for any bookable service (VR, fitness, dining, salon, etc.).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | Yes | Location ID (e.g. loc_downtown, loc_mall) | |
| date | Yes | Date in YYYY-MM-DD format | |
| activityId | No | Optional activity/service ID to filter slots |
Implementation Reference
- src/index.ts:647-662 (handler)Implementation of the get_available_slots tool handler, which forwards the request to the W3Ship API.
case 'get_available_slots': { const locationId = args?.locationId as string; const date = args?.date as string; const activityId = (args?.activityId || args?.gameId) as string | undefined; if (!locationId || !date) { return { content: [{ type: 'text', text: 'Error: locationId and date are required.' }], isError: true }; } // Map activityId to gameId for the W3Ship API const slotsUrl = `${W3SHIP_API}/api/slots?locationId=${locationId}&date=${date}${activityId ? `&gameId=${activityId}` : ''}`; const slotsRes = await fetch(slotsUrl); const slotsData = await slotsRes.json(); return { content: [{ type: 'text', text: JSON.stringify(slotsData, null, 2) }] }; }