prepare_booking_creation
Validates the exact class details and booking window, then returns a preview reference for execution without writing. Use it to confirm a class is bookable before committing.
Instructions
Read the current daily schedule and prepare one exact class booking. Requires a user-confirmed gym IANA zone and exact class name, date, start and end time. Ambiguous, missing, already booked, waitlisted or unsupported targets receive no reference. When a booking window is configured for the gym, a class whose window has not opened returns not-yet-open with bookingOpensAt (gym-local) and no reference; tell the account holder when it opens instead of retrying. Preparation sends no write. Read writeConfirmationRequired from preparation. Account context exposes the bookingCreation setting in writeConfirmationPolicy; cancellation always requires confirmation. When true, show the exact preview and obtain separate account-holder confirmation before execution with confirmed: true. When false, an explicit request for this exact action is sufficient; omit confirmed and do not ask for another confirmation. A query or preview-only request never authorizes execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| endTime | Yes | ||
| className | Yes | ||
| startTime | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gym | Yes | ||
| action | Yes | ||
| status | Yes | ||
| target | Yes | ||
| notices | Yes | ||
| expiresAt | No | ||
| alternatives | Yes | ||
| currentState | No | ||
| bookingOpensAt | No | ||
| actionReference | No | ||
| writeConfirmationRequired | Yes |