List cash scope by account type
well_list_cash_scopeList the account types a reader can count as cash, each with what it holds. This is what the cash-scope card offers; it measures nothing well_list_account_balances did not already read.
Each entry in groups is one account type: account_type, account_count, and subtotals — one native amount per currency, never converted and never blended. Sorted with the largest holdings first, so the biggest decision reads first. A type with no accounts is NOT listed: counting it would change nothing, so it is not a choice.
Only accounts the workspace owns are folded here. Ownership is settled by a fact about the account, not by a preference, so it is never offered as a choice on this card. excluded_not_owned counts what that removed, and unsettled_ownership counts accounts whose owner is unanswered — those are NOT in any group, and a non-zero count means the reader has a repair to do before any total is trustworthy. Say it rather than presenting the groups as the whole picture.
unreadable_balances counts owned accounts whose stored balance could not be read at all; unreadable_currency counts those carrying an amount with no currency code anywhere. Both are in no subtotal, so state them beside any figure rather than presenting one that silently skipped them — and keep them apart, because they are different repairs: a balance that did not arrive against a row that arrived incomplete.
folded_duplicates counts rows left out because they are a second copy of an account already listed, synced once per connector. They are in no group and no count, since the account they copy is counted once.
partial: true means the underlying read was cut short before it returned anything, so groups is empty and nothing is known about what the workspace holds. Say the read was cut short and offer to try again, rather than presenting an empty list as a decision.
The card records the reader's answer in this session, so wait for it: call well_wait_for_selection({ kind: "cash_scope" }) in the SAME turn, and read selection.counted_account_types. An EMPTY array there is the answer "nothing is cash" — a resolution that ends the run, never a zero total. Do not settle the scope yourself: on a workspace holding more than one type that is the figure decided on the reader's behalf. A card listing no type at all asks nothing and carries no wait. Once the answer is in, YOU apply it when you total the balances, then call well_render_cash_position with the types you counted in scope.account_types.
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 |
|---|---|---|---|
| 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 | ||
| groups | Yes | ||
| partial | Yes | ||
| success | Yes | ||
| next_step | No | What to do with the card this result renders. Added by the dispatcher when the card asks for a click. | |
| 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. | |
| folded_duplicates | Yes | ||
| excluded_not_owned | Yes | ||
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. | |
| unreadable_balances | Yes | ||
| unreadable_currency | Yes | ||
| unsettled_ownership | Yes | ||
| 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. |