Call one Bowmark function and keep the session open for the next call
session_callRuns ONE library function in a Bowmark session, so a flow that needs several calls in the SAME session can finish: a booking that texts the user a code, a cart filled over several steps, a form that waits on an answer from the user. run cannot do these, because every run starts fresh and nothing it held survives to the next run.
path is the function as a script writes it after bowmark., split on the dots: ["providers","opentable","startBooking"]. args are its arguments, in order. Look both up in get_library first. Omit sessionId on the first call: a session opens and its sessionId comes back. Pass that sessionId on every later call so it runs in the same session. A session runs one call at a time: never send parallel calls to the same sessionId with Promise.all. Each call waits for the previous one. For parallel work, open separate sessions or use run instead.
The answer is { sessionId, ok, status, result, logs, error?, code? }. status is ok, error or needs_user. needs_user pauses only this call for a sign-in and the session stays open: give the user meta.handoff.url, then repeat the call. A session closes itself after a few idle minutes, so ask the user for anything you need (a texted code) right away and make the next call as soon as they answer. Functions that decide per call whether they need a browser, including web_form_fields, must go through run, not session_call. Call session_close when the task is done.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "session_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | The function's arguments, in order, exactly as a script passes them. | |
| path | Yes | The function to call, as the path a script writes after `bowmark.`: `["providers","opentable","startBooking"]` for `bowmark.providers.opentable.startBooking`. | |
| sessionId | No | The `sessionId` an earlier `session_call` returned. Omit it on the first call and a new session opens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True when the call completed without an error. | |
| error | No | What went wrong, when it did. | |
| runId | No | The run's id; pass it back to resume or collect it. | |
| result | No | What the call returned. | |
| status | No | How the call ended: `ok`, `partial`, `error`, `paused`… | |
| message | No | Why the call failed, when `ok` is false. | |
| expiresAt | No | When an idle session ends (ISO 8601). | |
| sessionId | No | Pass it to the next `session_call` and to `session_close`. |