Skip to content

sessions_list_products

Passes, memberships, gift cards and merchandise with prices.

Discoveryread-only

When to use it

  • When the person asks about passes, memberships, class packs or gift cards.

  • To find the pass a session could be booked against, alongside sessions_list_purchases.

Parameters

kindstringoptional

Restrict to one kind of product.

One of: pass, membership, giftCard, physical

limitnumberoptional

Maximum products 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 product: name, id, kind (pass, membership, giftCard, physical), price, and how many sessions it covers where that applies. Hidden products are filtered out.

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

const result = await document.modelContext
  .executeTool(tool, {
    "kind": "pass",
    "limit": 10
  });
content
3 product(s):
- 10-Class Pass [<id>] · pass · 200.00 CAD
  · 10 session(s)
- Drop-in Pass [<id>] · pass · 24.00 CAD
structuredContent
{
  "products": [
    {
      "__typename": "Pass",
      "id": "<id>",
      "name": "10-Class Pass",
      "price": 20000,
      "effectivePrice": 20000,
      "sessionCount": 10
    }
  ],
  "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_products
What this business sells besides individual sessions: passes and class packs, memberships, gift cards, and physical products. Each comes back with its id, price, and what it covers.

See also