Skip to content

sessions_open_session

Opens the session detail sheet.

Navigation

When to use it

  • When the person seems ready to act on a session — better than describing it in prose.

  • On an embed, to bring your own <sessions-schedule> sheet up without the agent touching your page’s URL.

Parameters

sessionstringrequired

The scheduled session id, as returned by sessions_list_schedule. Pass it through verbatim — it is an opaque global id, not a number.

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.

Confirmation that the sheet is open. On an embed, an error naming NO_EMBED_TO_HANDLE when no Sessions schedule is mounted on the page to answer.

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

const result = await document.modelContext
  .executeTool(tool, {
    "session": "<session id>"
  });
content
Opened that session on the page. The person can
read the detail and book it from there. Nothing
has been booked.
structuredContent
{
  "url": "/@capital-bodywork/schedule/<id>"
}

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_open_session
Opens the session’s detail sheet on the page, so the person can read it and book it themselves. Does not book anything. Prefer this over describing a session in prose when they seem ready to act on it.

See also