Skip to content

sessions_list_bookings

The viewer’s own bookings, upcoming or past.

Viewerread-onlysign-in required

When to use it

  • When the person asks what they have booked.

  • To get the booking id sessions_cancel_booking needs.

Parameters

whenstringoptional

Which bookings to return. Default "upcoming".

One of: upcoming, past, all

limitnumberoptional

Maximum bookings to return. Default 25, maximum 100.

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.

One line per booking with this business: the session name, the booking id, its status, the session’s time, and the party size when it is more than one. Defaults to upcoming; pass when for past or all. Reads Me.bookings.

Example

Run this from any agent or script executing in the page.

javascript
const tools =
  await document.modelContext.getTools();

const tool = tools.find(
  (t) => t.name === 'sessions_list_bookings',
);

const result = await document.modelContext
  .executeTool(tool, {
    "when": "upcoming",
    "limit": 10
  });
content
2 upcoming booking(s). The id in each line
is what sessions_cancel_booking takes:
- Morning Yoga [booking <id>] · confirmed ·
  2026-09-02T09:00 → 2026-09-02T10:00
structuredContent
{
  "bookings": [
    {
      "id": "<id>",
      "status": "confirmed",
      "admissions": 1,
      "session": {
        "id": "<id>",
        "name": "Morning Yoga",
        "startAt": "2026-09-02T09:00:00.000Z"
      },
      "cancellationPreview": {
        "refundAmount": 2400,
        "withinWindow": true
      }
    }
  ]
}

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.

sessions_list_bookings
The signed-in viewer’s own bookings with this business — upcoming by default. Each carries a booking id you can pass to sessions_cancel_booking.

See also