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.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | Annotated[str, Field(description='Name of the Bridge Town model that owns the sheet.')] | Yes | — | |
sheet_id | Annotated[str, Field(description='Sheet identifier, as returned by list_native_sheets or create_native_sheet.')] | Yes | — | |
ref | Annotated[str, Field(description="A1 reference of the staged cell to discard, e.g. 'E10'.")] | Yes | — | |
tab_id | Annotated[str, Field(description='Tab the staged edit is on, as returned by get_native_sheet.')] | Yes | — | |
branch | `Annotated[str | None, 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.”)]` | No | None |
workspace_id | `Annotated[str | None, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]` | No | None |
Returns
Section titled “Returns”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.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "discard_staged_edit", "arguments": { "model_name": "forecasts", "sheet_id": "assumptions", "tab_id": "tab1", "ref": "B2" }}Response
Section titled “Response”{ "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.