Skip to content

sessions_list_schedule

Upcoming sessions with times, prices and remaining capacity, optionally filtered.

Discoveryread-only

When to use it

  • Any time the person asks what is on — this is the tool an agent will reach for most.

  • Before pricing or booking anything, to get the session id the other tools take.

  • With activity or staff set, to answer "what yoga is on this week" without listing everything.

Parameters

activitystringoptional

Activity name or id to narrow to.

staffstringoptional

Staff member name or id to narrow to.

fromstringoptional

Earliest start, as an ISO 8601 date or date-time.

tostringoptional

Latest start, as an ISO 8601 date or date-time.

limitnumberoptional

Maximum sessions 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 session: name, id, start and end time, price, and how many spots are left — plus the viewer’s own registration status where they have one. Times are in the business’s time zone; the header says which.

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_schedule',
);

const result = await document.modelContext
  .executeTool(tool, {
    "activity": "yoga",
    "limit": 5
  });
content
Capital Bodywork — showing 5 of 23 upcoming
session(s). Times are in America/Toronto.
- Morning Yoga [<id>] · 2026-09-02T09:00
  → 2026-09-02T10:00 · 24.00 CAD · 4 spot(s) left
structuredContent
{
  "sessions": [
    {
      "id": "<id>",
      "name": "Morning Yoga",
      "startAt": "2026-09-02T09:00:00.000Z",
      "endAt": "2026-09-02T10:00:00.000Z",
      "status": "scheduled",
      "price": 2400,
      "registrationCount": 8,
      "myRegistration": null
    }
  ],
  "currency": "cad"
}

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_schedule
The upcoming schedule: each session with its id, name, activity, start and end time, price, spots remaining, and whether the viewer is already registered. Optionally narrow by activity, staff member, or date range. Scoped to the business whose page this is — there is no argument to reach a different business.

See also