Render a caller-computed cost structure
well_render_cost_structurePut a cost breakdown YOU computed onto the cost-structure card.
This tool measures nothing. It takes the slices and the method behind them as input and returns them for rendering. Call it only after you have computed the breakdown yourself and can state every field below from your own work, never to "get" a cost structure.
The server derives no breakdown of its own. The chart draws the slices you state here, which is why every field below is required: the policy behind a grouping is the only thing that makes it checkable.
The card draws the ring, the legend and the month. Everything else you state below is REQUIRED and reaches no pixel. All of it comes back to you in this tool's text result, which is what you write the prose from. The chart is the measure; the explanation is yours.
REQUIRED, because a breakdown whose method is not stated cannot be checked:
entries: the slices, largest first, each a POSITIVE magnitude incurrency. Send NO share: this tool derives every share from the amounts and returns them, and an entry carryingpctis refused as an unknown field. At most 4 named slices plus one rolled-upOther, because the card performs no rollup of its ownperiod_startandperiod_end: the INCLUSIVE bounds of the single calendar month covered. Never a quarter, never a span, never a month still runningrung: which grouping produced these categories. State it in prose too, so the reader knows whether they are looking at their own ledger's categories or Well'slabel_provenance: whether a person owns those labels. A chart of accounts synced from an accounting tool ismachine, notcurated: the names came from the provider, not from anyone at the companycoverage: the outflow rows the elected grouping could label, against every outflow row the month held. This is the evidence the rung was elected on, and your prose states itconventionandconvention_counts: which sign means money leaving, and the row counts you elected it fromexcluded: what fell out, in four named groups.no_asset_movementis where CARD SPEND lands, because the transfer rule drops a row with no owned asset leg and a card charge moves a liability. It containsno_owned_leg, so never add them. Send an unmeasured LEG count asnullrather than0, because zero says the rule removed nothing, and one cancelled leg count nulls all three.unreadable_rowsis always measured and takes a number
REFUSED rather than rendered:
an entry carrying
pct, or any other field this schema does not name. The shares are DERIVED here from the amounts, so a share you send is a second opinion the card has no way to reconcileentries out of descending-amount order, more than 4 named slices, or an
Otherslice that is not lasta negative
amount: a breakdown is made of magnitudesa
period_start/period_endpair that is not exactly one whole calendar month, or that names a month which has not endedcategory_keyon any rung butcategory_key, or on the rolled-upOtherslice, which is many categories and is therefore not one of themany
label_provenancebutunlabelledon a rung that carries no category:curated,machineandmixedeach claim that someone or something chose labels the chart never shows. The converse is NOT refused, because a rung elects over the month's rows while the provenance describes the ones that survived into the slices, so a labelled rung whose labelled rows all dropped is legitimatelyunlabelledrung: "uncategorised"sent beside named category slices, which is a breakdown claiming to be the absence of oneconvention: "magnitude": that feed keeps direction in a field no grouping reaches, so no outflow was measured.signedelected from ZERO negative rows is the same finding, demonstrated rather than declaredcoverage wider than the month it covers, or a labelled rung that could label no rows at all
one of
excluded.internal_transfers,excluded.no_owned_legandexcluded.no_asset_movementnullwhile the others are measured: one cancelled count nulls all three, and the refusal is filed againstexcluded.no_asset_movementa
currencyoutside ISO-4217: the code is checked against the catalog, not its shape
An EMPTY entries array is accepted, and it means nothing is categorized for that month. Say that, rather than reporting zero spend: a month with no outflow at all is a different answer and the card says so differently.
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 |
|---|---|---|---|
| rung | Yes | Which grouping produced these categories. | |
| entries | Yes | The slices, largest first, with the rolled-up `Other` last when there is one. | |
| coverage | Yes | The evidence the rung was elected on, so a reader can check the election rather than take it. | |
| currency | Yes | ISO-4217 code every amount is denominated in. Checked against the catalog, not its shape. | |
| excluded | Yes | The four exclusion groups kept apart: the transfers the rule removed, the rows with no owned asset leg (card spend), the subset of those attributable to no account at all, and the rows dropped as unreadable. Merging them hides the difference between a rule and a defect. | |
| convention | Yes | Which sign the feed uses for an outflow. "magnitude" is refused: it measures no outflow. | |
| period_end | Yes | INCLUSIVE last day of that same month. | |
| period_start | Yes | INCLUSIVE first day of the month covered. | |
| 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. | |
| label_provenance | Yes | Whether a person set or confirmed the labels the reader can see. | |
| convention_counts | Yes | The row counts the convention was elected from. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rung | Yes | ||
| entries | Yes | ||
| success | Yes | ||
| coverage | Yes | ||
| currency | Yes | ||
| excluded | Yes | ||
| convention | Yes | ||
| period_end | Yes | ||
| computed_by | 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. | |
| label_provenance | Yes | ||
| convention_counts | 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. |