list_bookings
Retrieve confirmed session bookings with optional filters for location or date to manage scheduling and availability.
Instructions
List all confirmed session bookings. Optionally filter by location or date.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | No | Filter by location ID | |
| date | No | Filter by date (YYYY-MM-DD) |
Implementation Reference
- src/index.ts:683-696 (handler)The handler for the 'list_bookings' tool which fetches booking information from the W3Ship API.
case 'list_bookings': { const locationId = args?.locationId as string | undefined; const date = args?.date as string | undefined; const params = new URLSearchParams(); if (locationId) params.set('locationId', locationId); if (date) params.set('date', date); const queryStr = params.toString() ? `?${params.toString()}` : ''; const bookingsRes = await fetch(`${W3SHIP_API}/api/bookings${queryStr}`); const bookingsData = await bookingsRes.json(); return { content: [{ type: 'text', text: JSON.stringify(bookingsData, null, 2) }] }; } - src/index.ts:194-203 (registration)The tool registration block for 'list_bookings' in the server configuration.
name: 'list_bookings', description: 'List all confirmed session bookings. Optionally filter by location or date.', inputSchema: { type: 'object', properties: { locationId: { type: 'string', description: 'Filter by location ID' }, date: { type: 'string', description: 'Filter by date (YYYY-MM-DD)' }, }, }, },