Skip to content

update_bsheet_cells

Write cell values, formulas, clear operations, or explicit semantic roles (parameter, annotation, label) to an editable native-sheet tab. Each input edit commits with its automatic calculation workflow and returns a receipt for retry or Undo. An append-only tab_resize, range formatting, or tab presentation change may be combined with cell updates in the same atomic commit; content edits still calculate and request the attached model.

destructive

Name Type Required Default Description
model_name string Yes — Name of the Bridge Town model that owns the sheet.
sheet_id string Yes — Sheet identifier, as returned by list_bsheets.
tab_id string Yes — Editable tab identifier, as returned by get_bsheet.
updates list of object Yes — Value, formula, role, or clear edits. role is parameter|annotation|label; omit it to preserve classification or pass null to unclassify.
range_updates list of object No — Optionally apply bounded range style/number-format patches in the same atomic commit as cell content edits.
tab_formatting object No None Optionally merge tab presentation settings in the same atomic commit as cell content edits.
tab_resize object No None Optionally grow tab_id in the same atomic write as appended cell updates. Object with row_count (int) and/or column_count (int); growth is append-only and shrink requests are rejected. Requires tab_id.
client_edit_id string No None Optional idempotency key for this edit. Reuse it when retrying the same request so the write and model run are not duplicated. If both this and expected_sha are omitted, each call is treated as a new edit; provide this key when a retry must reuse the original receipt.
undo_receipt_id string No None Receipt id returned for your own recent automatic input edit. When set, updates must be the exact inverse batch returned with that receipt; the server verifies authorship and current cell contents before committing it.
expected_sha string No '' Expected sheet blob SHA-1 for optimistic concurrency.
commit_message string No '' Optional Git commit message.
branch string No None Scenario branch; null uses the sheet default.
workspace_id string No None

Returns a structured object. Top-level fields:

  • model_name (string)
  • sheet_id (string)
  • tab_id (string)
  • branch (string)
  • commit_sha (string)
  • sha (string)
  • updated_cells (integer)
  • range_formatted_cells (integer)
  • calculation_status (string)
  • new_tab_id (null)
  • workspace_id (string)
  • staged_count (integer)
  • operation_id (string)
  • receipt_id (string)
  • calculation_state (string)
  • run_requested (boolean)
  • run_intent (object)
  • run_id (string)
  • edit_saved (boolean)
  • retry_hint (null)
  • client_edit_id (string)
  • undo_receipt_id (string)
  • undo_tab_id (string)
  • undo_updates (array<object>)
  • committed_at (string)

See the response example below for the full payload shape.

{
"name": "update_bsheet_cells",
"arguments": {
"model_name": "forecasts",
"sheet_id": "assumptions",
"tab_id": "tab1",
"updates": [
{
"a1_ref": "B2",
"value": 1800000
},
{
"a1_ref": "B5",
"formula": "=SUM(B2:B4)"
}
],
"expected_sha": "abc1234def5678901234567890abcdef12345678",
"client_edit_id": "edit_revenue_assumptions_01"
}
}
{
"model_name": "forecasts",
"sheet_id": "assumptions",
"tab_id": "tab1",
"branch": "main",
"commit_sha": "abc1234def5678901234567890abcdef12345678",
"sha": "abc1234def5678901234567890abcdef12345678",
"updated_cells": 2,
"range_formatted_cells": 0,
"calculation_status": "clean",
"new_tab_id": null,
"workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
"staged_count": 0,
"operation_id": "op_edit_revenue_assumptions_01",
"receipt_id": "receipt_edit_revenue_assumptions_01",
"calculation_state": "clean",
"run_requested": true,
"run_intent": {
"requested": true,
"run_id": "66666666-6666-6666-6666-666666666666",
"state": "success"
},
"run_id": "66666666-6666-6666-6666-666666666666",
"edit_saved": true,
"retry_hint": null,
"client_edit_id": "edit_revenue_assumptions_01",
"undo_receipt_id": "undo_revenue_assumptions_01",
"undo_tab_id": "tab1",
"undo_updates": [
{
"a1_ref": "B2",
"value": 1500000
},
{
"a1_ref": "B5",
"clear": true
}
],
"committed_at": "2026-04-28T10:00:00+00:00"
}
  • Module: BSheets
  • Requires an authenticated Bridge Town session (OAuth) or an API token.