Skip to content

edit_bsheet_tab

Apply one additive structural edit to an editable native-sheet tab: create, rename, resize, or insert a row/column. op selects the edit and determines which other fields are required: ‘create’ takes new_tab (and no tab_id – the server generates one); ‘rename’ takes tab_id and name; ‘resize’ takes tab_id and resize (row/column bounds, growth only – shrinking is rejected); ‘insert’ takes tab_id, axis, and index (inserts exactly one row or column and shifts cells and formatting).

changes state

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.
op one of: create, rename, resize, insert Yes — Which structural edit to apply: create, rename, resize, or insert.
tab_id string No None Tab to rename/resize/insert into. Omit for op=‘create’.
new_tab object No None Name and optional bounds for a new tab. Required for op=‘create’.
name string No None New display name for the tab. Required for op=‘rename’.
resize object No None New row and/or column bounds, growth only. Required for op=‘resize’.
axis one of: row, column No None Axis to insert. Required for op=‘insert’.
index integer No None Zero-based insertion position. Required for op=‘insert’.
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 (string)
  • workspace_id (string)
  • staged_count (null)

See the response example below for the full payload shape.

{
"name": "edit_bsheet_tab",
"arguments": {
"model_name": "forecasts",
"sheet_id": "assumptions",
"op": "create",
"new_tab": {
"name": "Summary",
"row_count": 100,
"column_count": 26
},
"expected_sha": "abc1234def5678901234567890abcdef12345678"
}
}
{
"model_name": "forecasts",
"sheet_id": "assumptions",
"tab_id": "tab2",
"branch": "main",
"commit_sha": "abc1234def5678901234567890abcdef12345678",
"sha": "abc1234def5678901234567890abcdef12345678",
"updated_cells": 0,
"range_formatted_cells": 0,
"calculation_status": "dirty",
"new_tab_id": "tab2",
"workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
"staged_count": null
}
  • Module: BSheets
  • Requires an authenticated Bridge Town session (OAuth) or an API token.