Skip to content

create_bsheet

Create a new native input sheet in a model, with optional starter tabs containing literal rows and an optional model attachment, and commit its canonical .bsheet.json document atomically. Always creates purpose=‘input’ — output sheet views are generated separately, not created through this tool. sheet_id is generated by the server; you cannot choose one.

NameTypeRequiredDefaultDescription
model_nameAnnotated[str, Field(description='Name of the Bridge Town model to attach the new sheet to.')]Yes—
nameAnnotated[str, Field(description='Display name for the new sheet.', min_length=1, max_length=MAX_SHEET_NAME_LENGTH)]Yes—
attached_model`Annotated[strNone, Field(description=“Optional stable Bridge Town model name associated with this sheet. Input documents may retain a repository-relative entrypoint path; public Native Sheet responses expose that path as its model name. Recorded for lineage only — not validated against the model’s contract.”)]`NoNone
currency`Annotated[strNone, Field(description=‘Optional active ISO 4217 override; defaults to the model currency.’)]`NoNone
locale`Annotated[strNone, Field(description=‘Optional supported display-locale override; defaults to the model.’)]`NoNone
tabs`Annotated[list[dict[str, Any]]None, Field(description=“Optional tabs, up to 25. Each item may set name (str), row_count (int), column_count (int), and rows (non-empty rectangular list of literal scalar values or nulls). Supplying rows creates an editable sparse input tab in the same atomic commit; blank positions remain explicit. A supplied table must fit the 40,000-cell sheet limit and match any declared dimensions. Without rows, the tab is created empty (defaults: 100x26). When omitted, one empty tab named ‘Sheet1’ (100x26) is created. Native Sheet documents are limited to 4 MiB; MCP requests retain their 1 MiB transport limit.”)]`NoNone
branch`Annotated[strNone, Field(description=“Branch to commit the new sheet to. Defaults to the model’s default branch when omitted or null.”)]`NoNone
commit_messageAnnotated[str, Field(description='Git commit message. If omitted, the server generates a default message.')]No''
response_detailLiteral['auto', 'receipt', 'full']No'auto'
workspace_id`Annotated[strNone, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]`NoNone

Returns a structured object. Top-level fields:

  • model_name (string)
  • sheet_id (string)
  • name (string)
  • purpose (string)
  • attached_model (string)
  • branch (null)
  • commit_sha (string)
  • sha (string)
  • tab_count (integer)
  • row_count (integer)
  • column_count (integer)
  • cell_count (integer)
  • response_detail (string)
  • tabs (array<object>)
  • calculation_status (string)

See the response example below for the full payload shape.

{
"name": "create_bsheet",
"arguments": {
"model_name": "forecasts",
"name": "Revenue Assumptions",
"attached_model": "revenue",
"response_detail": "auto",
"tabs": [
{
"name": "Inputs",
"row_count": 100,
"column_count": 26
}
]
}
}
{
"model_name": "forecasts",
"sheet_id": "sht_1a2b3c4d5e6f7890a1b2c3d4e5f67890",
"name": "Revenue Assumptions",
"purpose": "input",
"attached_model": "revenue",
"branch": null,
"commit_sha": "abc1234def5678901234567890abcdef12345678",
"sha": "abc1234def5678901234567890abcdef12345678",
"tab_count": 1,
"row_count": 100,
"column_count": 26,
"cell_count": 0,
"response_detail": "full",
"tabs": [
{
"tab_id": "tab_2b3c4d5e6f7890a1b2c3d4e5f6789012",
"name": "Inputs",
"row_count": 100,
"column_count": 26,
"cell_count": 0,
"cell_encoding": "sparse",
"cells": {},
"rows": [],
"formatting": {
"column_widths": {},
"row_heights": {},
"frozen_rows": 0,
"frozen_columns": 0,
"show_gridlines": true
}
}
],
"calculation_status": "clean"
}
  • Module: BSheets
  • Requires an authenticated Bridge Town session (OAuth) or an API token.