Skip to content

discard_staged_edit

Discard one MCP-staged cell edit, selected by tab_id and ref after update_bsheet_cells(mode=“staged”). Idempotent: discarding a ref with no staged edit succeeds with discarded=false rather than erroring.

NameTypeRequiredDefaultDescription
model_nameAnnotated[str, Field(description='Name of the Bridge Town model that owns the sheet.')]Yes—
sheet_idAnnotated[str, Field(description='Sheet identifier, as returned by list_bsheets or create_bsheet.')]Yes—
ref`Annotated[strNone, Field(description=“A1 reference of the staged cell to discard, e.g. ‘E10’.”)]`NoNone
tab_id`Annotated[strNone, Field(description=‘Tab the staged edit is on, as returned by get_bsheet.’)]`NoNone
branch`Annotated[strNone, Field(description=“Branch the staged edit is on. When omitted or null, resolves to the sheet’s default/unresolved-branch row, same normalization as update_bsheet_cells.”)]`NoNone
workspace_id`Annotated[strNone, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]`NoNone

Returns a structured object. Top-level fields:

  • model_name (string)
  • sheet_id (string)
  • branch (string)
  • discarded (boolean)
  • staged_count (integer)
  • workspace_id (string)
  • tab_id (string)
  • ref (string)

See the response example below for the full payload shape.

{
"name": "discard_staged_edit",
"arguments": {
"model_name": "forecasts",
"sheet_id": "assumptions",
"tab_id": "tab_inputs",
"ref": "B4",
"branch": "scenario/upside"
}
}
{
"model_name": "forecasts",
"sheet_id": "assumptions",
"branch": "scenario/upside",
"discarded": true,
"staged_count": 0,
"workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
"tab_id": "tab_inputs",
"ref": "B4"
}
  • Module: BSheets
  • Requires an authenticated Bridge Town session (OAuth) or an API token.