# protect_sheet_range (https://sellersheetai.com/docs/mcp-api/tools/protect_sheet_range)

> Protect a range from editing.

Access: **WRITE** · toolset google_workspace · family null

## Call it

MCP tool call:

```json
{
  "name": "protect_sheet_range",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "range_": "<range_>"
  }
}
```

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/protect_sheet_range \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheet_id":"<spreadsheet_id>","range_":"<range_>"}'
```

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `spreadsheet_id` | string | yes | the spreadsheet ID (from its URL or get_sheet_metadata). |
| `range_` | string | yes | A1 range with sheet name, e.g. 'KPIs!A1:E20'. |
| `description` | string |  | Label shown when a non-editor tries to edit. |
| `warning_only` | boolean |  | If True, show a warning but don't block. |
| `editors` | object[] |  | email addresses allowed to edit. Hard lock only: Google does not support editors when warning_only is true. |

## Result

- { protectedRangeId: int, sheetId: int }

## Gotchas

- warning_only=False (default): hard-lock. Only editors can modify. warning_only=True: shows a warning dialog, but anyone can proceed. Every range here must name its tab; an open end is allowed ('Tab!C7:C' runs to the bottom, 'Tab!A:D' is whole columns); a range without a tab ('A1:D10') is refused. If editors is not provided, only the spreadsheet owner can edit the protected range.

## Example

- protect_sheet_range( "1ABC...", "KPIs!A1:E20", description="KPI targets - do not edit", editors=["admin@example.com"], )