Get session digest
well_get_session_digestGet everything a returning person's first answer needs, in one call: what happened in the workspace since they last looked, where the workspace stands now, and the Well skills that can take it forward.
When the person asks what happened since last time, asks to be caught up, or opens a session, do not call this first: load the signing-back skill with well_get_skill and follow it. That procedure greets, reads this digest, and proposes the next steps; calling this tool alone skips the greeting and the proposals. Call this tool directly only when a loaded Well skill says to, or when the person asks for the raw counts and nothing else.
Returns records (one entry per record type with its created / updated / deleted counts and the connectors those creations came from), errors (the pipeline failures worth acting on), skills_run (the Well skills this person already ran recently, so you do not propose one they just finished), and boundary + since_at saying where the window starts. is_first_session true means there is no earlier moment to report from: greet the person and skip the recap. truncated true means the window stopped at 5000 events and the counts cover part of the tail only.
Also returns situation, the state behind the recap, so no follow-up read is needed: connectors (the tools this workspace connected, each with its connection_status and last_successful_sync_at, beside connected_count; the size of Well's catalog is not carried, because it is never a figure to tell the person), open_period (the month Well opens the close on, with its label, is_complete and selectable), and missing_invoices (that month's row_count of counterparties with settled spend and no invoice, plus its hints). Each part is null when its read refused or had nothing to read. A null says the part is UNKNOWN: never report it as an empty connector list, a workspace with no open month, or a month owing nothing.
And skills: the whole Well skill roster, the same entries well_search_skill returns, so a step a click names is loaded with well_get_skill rather than searched for again. roster_readable false says the roster could not be read at all, so skills is empty because nothing loaded: propose no next step in that turn, because every slug would be invented.
And suggested_steps: the five next steps Well ranked for this workspace, each a skill from the roster and the reason it ranks there. The rubric runs on the server: open gaps first (no bank, a month owing invoices, no accounting tool, a stale sync), then the open month's close, then the analysis skills, and never a skill served in the last day. Hand these five to well_propose_next_steps in this order and rank nothing yourself. The sentence each one is offered as is yours to write, in the language the person is using, from that skill's own quoted utterances in skills and the figures above. When the list is empty, nothing was offerable: call no render tool and write no five of your own, say so in one line.
Pass mark: true to advance this person's read cursor to the end of the window, so the next digest starts where this one ended. That cursor is shared with the app, so marking here also clears what the app shows as unread. Pass mark: false (or omit it) to inspect the digest without moving anything.
The figures are computed by Well. State them as returned: do not re-count, round, or total them yourself.
When the token authorizes one workspace, call this directly — no other tool call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mark | No | Advance this person's read cursor to the end of the window, so the next digest starts where this one ended. Pass true when you are about to report the digest to the person, false when you are only inspecting it. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| errors | Yes | ||
| reason | Yes | ||
| skills | Yes | The whole Well skill roster, the same entries well_search_skill returns. The step a click names is loaded from it with well_get_skill. | |
| records | Yes | ||
| success | Yes | ||
| boundary | Yes | Where the window starts: the person's read cursor, their previous sign-in, or neither. Null on a refusal. | |
| since_at | Yes | The instant the window starts from, set only when a previous sign-in bounded it. | |
| situation | Yes | Where the workspace stands now: its connected tools, its open month, and what that month still owes. | |
| time_zone | Yes | The IANA time zone the label was written in, from the workspace's settings. | |
| truncated | Yes | True when events sit past the read cap of 5000, so the counts cover part of the tail only. | |
| skills_run | Yes | ||
| since_at_label | Yes | The same instant written in the workspace's own time zone, such as "Tuesday 8 September at 09:50", ready to quote in the greeting. | |
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| roster_readable | Yes | False when the roster could not be read at all, so `skills` is empty because nothing was readable rather than because the build ships no skill. Propose no next step on false: every slug would be invented and refused. | |
| suggested_steps | Yes | The five next steps Well ranked for this workspace, in card order, from its gaps, its open month and the skills already run. Hand these five to well_propose_next_steps in this order, never reordered or replaced. You write the sentence each one is offered as, in the language the person is using, from that skill's own quoted trigger utterances in `skills` and the figures this digest returned. Empty means nothing was offerable: draw no card and write no five of your own. | |
| is_first_session | Yes | ||
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. |