Render a caller-computed cash-flow bridge
well_render_cash_flow_bridgePut a cash-flow bridge YOU computed onto the cash-flow waterfall card.
This tool measures nothing. It takes the four terms of a bridge and the gap between them as input, draws the waterfall, and returns them. Call it only after you have read the opening and closing positions and summed the window's flows yourself — never to "get" a bridge.
A bridge rests on one law: the opening, plus the inflows, minus the outflows, lands on the closing. The closing is measured on its own rather than summed from the flows, so the law is a check rather than a given. State the gap as unexplained and the tool verifies the five figures add up; state figures that do not and it refuses.
REQUIRED:
currency— every figure below is in it, each converted before you stated itperiod_start,period_end— the inclusive calendar days the flows coveropening—amount(SIGNED, a workspace can be overdrawn),as_of(the day beforeperiod_start), andderived(true only when you solved it from the law because the reading could not be taken)inflows,outflows— gross magnitudes, both positive; the direction lives in which bar they areunexplained— the SIGNED gapclosing - (opening + inflows - outflows), computed from the figures as you rounded them; zero when they meetclosing—amount(SIGNED) andas_of, the moment the reading was takenreconciles— true when the gap is inside the tolerance below, false when it is past itpartial— true when any term is incomplete: an anchor some accounts had no reading for, flows with rows no owned account could be placed against, rows that could not be read, or a currency with no rate. A cut-short read returns no rows and stops the run before this call
The tolerance is the product's own: 1% of the closing position's size, never less than 1 in the base currency. A bridge that does not reconcile draws an Unexplained bar between the outflows and the closing; one that does draws none.
REFUSED rather than rendered, each because your own figures disagree:
five figures that do not add up to within a cent
reconciles: truewith a gap past the tolerance, orfalsewith one inside ita negative
inflowsoroutflows; each is a magnitude, so a negative one was re-signedan opening not dated the day before
period_starta window ending more than a day from the day the closing was read
a window that starts after it ends, or a date that names no real day
a derived opening with any gap, on a partial read, or over a window with no flows
a closing
as_ofin the future
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 |
|---|---|---|---|
| closing | Yes | ||
| inflows | Yes | ||
| opening | Yes | ||
| partial | Yes | ||
| currency | Yes | ||
| outflows | Yes | ||
| period_end | Yes | ||
| reconciles | Yes | ||
| unexplained | Yes | ||
| period_start | Yes | ||
| 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 |
|---|---|---|---|
| steps | Yes | ||
| closing | Yes | ||
| inflows | Yes | ||
| opening | Yes | ||
| partial | Yes | ||
| success | Yes | ||
| currency | Yes | ||
| outflows | Yes | ||
| period_end | Yes | ||
| reconciles | Yes | ||
| computed_by | Yes | ||
| unexplained | Yes | ||
| period_start | Yes | ||
| 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. | |
| 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. |