Skip to content

sessions_get_business

Identity, locations, time zone, currency and contact details.

Discoveryread-only

When to use it

  • To answer "where are you", "when are you open", "how do I contact you" without the agent scraping the page.

  • To get the time zone and currency before the agent formats any time or price itself.

Parameters

This tool takes no arguments.

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 business’s name and handle, its public description, every location with its address, the IANA time zone, the ISO currency code, and the contact email and phone.

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

const result = await document.modelContext
  .executeTool(tool);
content
Capital Bodywork (@capital-bodywork)
Time zone: America/Toronto
Currency: CAD
Email: hello@example.com
Locations:
  - Richmond Road — 375 Richmond Road, Ottawa, ON
structuredContent
{
  "business": {
    "id": "<id>",
    "name": "Capital Bodywork",
    "handle": "capital-bodywork",
    "localization": {
      "timezone": "America/Toronto",
      "currency": "cad"
    },
    "locations": {
      "nodes": [
        "…"
      ]
    }
  }
}

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_get_business
Details of the business whose page this is: name, handle, description, locations and addresses, time zone, currency, and contact details. The business is fixed by the page — there is no argument to change it.

See also