sessions_book_session
Books a session outright when the amount due is zero. Never takes payment details.
When to use it
Only when
sessions_preview_checkouthas already returned an amount due of zero.For a free session, or one covered by a pass, membership or gift-card credit the person already holds.
Never as a first resort — the agent should have told the person what it is about to book.
Parameters
sessionstringrequiredThe scheduled session id, as returned by sessions_list_schedule. Pass it through verbatim — it is an opaque global id, not a number.
ticketsarrayoptionalFor a session that sells named admission bands ("Adult", "Child"), how many of each. One booking is written for the whole party. Price ids come from prices on sessions_get_session. Omit for a session that sells one undifferentiated spot.
passstringoptionalId of the pass or membership to spend, from sessions_list_purchases. Omit for a free session.
giftCardCodestringoptionalGift-card code to cover the seat.
discountCodestringoptionalDiscount code that brings the total to zero.
Returns
Every tool returns two things: text for the model to read, and a structuredContent object beside it for code that would rather branch on a field.
The booking id and status on success. On refusal, an error carrying a code you can branch on: PAYMENT_REQUIRED when money is owed, REGISTRATION_BLOCKS_REQUIRED when a form or waiver is in the way, ALREADY_BOOKED when the viewer already holds or is queued for a place, BOOKING_REJECTED when checkout refuses the booking, or SIGN_IN_REQUIRED. Every refusal points at sessions_start_booking. When a pass was named that turned out to settle nothing, the PAYMENT_REQUIRED message says so — an entitlement that does not cover the session, or a pass predating the move to the new checkout — rather than reporting a bare balance.
Example
Run this from any agent or script executing in the page.
const tools =
await document.modelContext.getTools();
const tool = tools.find(
(t) => t.name === 'sessions_book_session',
);
const result = await document.modelContext
.executeTool(tool, {
"session": "<session id>",
"pass": "<pass id>"
});Booked. Morning Yoga on 2026-09-02T09:00 →
2026-09-02T10:00 — booking <id>,
status confirmed. Nothing was charged.{
"booking": {
"id": "<id>",
"status": "confirmed",
"admissions": 1,
"createdAt": "2026-08-27T14:00:00.000Z",
"waitlistPosition": null,
"participant": {
"id": "<id>",
"name": "Dana Whitfield"
}
}
}What the agent is told
The description the model reads when deciding whether to call this. It is the only thing that decides whether the tool fires at the right moment, so it is worth knowing what it says.