Skip to content

discard_staged_edit

Remove exactly one MCP-staged cell edit (staged via update_native_sheet_cells(mode=“staged”)) without touching Git or any other staged edit. Idempotent: discarding a ref with no staged edit succeeds with discarded=false rather than erroring — safe to call speculatively or retry. Requires at least Editor role.

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_native_sheets or create_native_sheet.')]Yes
refAnnotated[str, Field(description="A1 reference of the staged cell to discard, e.g. 'E10'.")]Yes
tab_idAnnotated[str, Field(description='Tab the staged edit is on, as returned by get_native_sheet.')]Yes
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_native_sheet_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)
  • tab_id (string)
  • ref (string)
  • branch (string)
  • discarded (boolean)
  • staged_count (integer)
  • workspace_id (string)

See the response example below for the full payload shape.

{
"name": "discard_staged_edit",
"arguments": {
"model_name": "forecasts",
"sheet_id": "assumptions",
"tab_id": "tab1",
"ref": "B2"
}
}
{
"model_name": "forecasts",
"sheet_id": "assumptions",
"tab_id": "tab1",
"ref": "B2",
"branch": "main",
"discarded": true,
"staged_count": 1,
"workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"
}
  • Module: Native Sheets
  • Requires authentication via API token or Auth0 JWT.