Skip to main content
Glama

Render a caller-computed cost structure

well_render_cost_structure
Read-only

Put 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 in currency. Send NO share: this tool derives every share from the amounts and returns them, and an entry carrying pct is refused as an unknown field. At most 4 named slices plus one rolled-up Other, because the card performs no rollup of its own

  • period_start and period_end: the INCLUSIVE bounds of the single calendar month covered. Never a quarter, never a span, never a month still running

  • rung: 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's

  • label_provenance: whether a person owns those labels. A chart of accounts synced from an accounting tool is machine, not curated: the names came from the provider, not from anyone at the company

  • coverage: 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 it

  • convention and convention_counts: which sign means money leaving, and the row counts you elected it from

  • excluded: what fell out, in four named groups. no_asset_movement is where CARD SPEND lands, because the transfer rule drops a row with no owned asset leg and a card charge moves a liability. It contains no_owned_leg, so never add them. Send an unmeasured LEG count as null rather than 0, because zero says the rule removed nothing, and one cancelled leg count nulls all three. unreadable_rows is 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 reconcile

  • entries out of descending-amount order, more than 4 named slices, or an Other slice that is not last

  • a negative amount: a breakdown is made of magnitudes

  • a period_start/period_end pair that is not exactly one whole calendar month, or that names a month which has not ended

  • category_key on any rung but category_key, or on the rolled-up Other slice, which is many categories and is therefore not one of them

  • any label_provenance but unlabelled on a rung that carries no category: curated, machine and mixed each 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 legitimately unlabelled

  • rung: "uncategorised" sent beside named category slices, which is a breakdown claiming to be the absence of one

  • convention: "magnitude": that feed keeps direction in a field no grouping reaches, so no outflow was measured. signed elected from ZERO negative rows is the same finding, demonstrated rather than declared

  • coverage 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_leg and excluded.no_asset_movement null while the others are measured: one cancelled count nulls all three, and the refusal is filed against excluded.no_asset_movement

  • a currency outside 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

TableJSON Schema
NameRequiredDescriptionDefault
rungYesWhich grouping produced these categories.
entriesYesThe slices, largest first, with the rolled-up `Other` last when there is one.
coverageYesThe evidence the rung was elected on, so a reader can check the election rather than take it.
currencyYesISO-4217 code every amount is denominated in. Checked against the catalog, not its shape.
excludedYesThe 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.
conventionYesWhich sign the feed uses for an outflow. "magnitude" is refused: it measures no outflow.
period_endYesINCLUSIVE last day of that same month.
period_startYesINCLUSIVE first day of the month covered.
workspace_idNoTarget 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_idNoThe 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_provenanceYesWhether a person set or confirmed the labels the reader can see.
convention_countsYesThe row counts the convention was elected from.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rungYes
entriesYes
successYes
coverageYes
currencyYes
excludedYes
conventionYes
period_endYes
computed_byYes
period_startYes
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
label_provenanceYes
convention_countsYes
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_note
      Added value: +{
      +  "description": "Present only when the server opened a fresh lane, stating that no choice recorded earlier was read.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / conversation_id_source
      Added value: +{
      +  "description": "Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.",
      +  "enum": [
      +    "host_meta",
      +    "argument",
      +    "minted"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, but the description adds substantial behavioral context: the server derives no breakdown, shares are derived from amounts and any sent pct is refused, empty entries mean 'nothing is categorized,' and the tool returns text for the agent's prose. These details go far beyond what annotations convey and do not contradict them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long, but the complexity of a 12-parameter rendering tool with many refusal rules justifies it. It is well-structured with bolded lead sentences, grouped REQUIRED fields, a REFUSED list, and a dedicated empty-entries paragraph. The core purpose is front-loaded in the first sentence, and every section adds needed guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers when to call, what the caller must compute, every parameter's semantic role, refusal conditions, workspace behavior, and what the text result is for. The output schema exists, so the description need not repeat return fields; instead it focuses on the reasoning and constraints an agent needs to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema description coverage is 100%, the description adds critical semantic meaning: why pct is refused, that no_asset_movement contains no_owned_leg and must not be summed together, that null means 'could not count' while 0 means 'rule removed nothing,' and that currency is validated against a catalog. This transforms the schema from a type contract into an operational specification.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Put a cost breakdown YOU computed onto the cost-structure card.' It immediately distinguishes itself from measurement tools by stating 'This tool measures nothing,' and clarifies that it is for rendering a caller-computed breakdown. This makes the tool's role unambiguous among many well_render_* siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to call it ('only after you have computed the breakdown yourself'), when not to call it ('never to "get" a cost structure'), and gives operational guidance about workspace_id for single- vs multi-workspace tokens. It also explains why the rung must be stated in prose, giving the agent decision criteria beyond mere function naming.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources