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

> Apply several raw Sheets API v4 requests (spreadsheets.batchUpdate) in one call.

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

Use it for 3+ structural operations at once (write values + format header + autofit columns + freeze panes); a single operation reads better through its dedicated tool (write_sheet, format_sheet_range), because the raw request shape is verbose.

## Call it

MCP tool call:

```json
{
  "name": "sheet_batch_update",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "requests": []
  }
}
```

Tool API (early access — contact us):

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

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `spreadsheet_id` | string | yes | the spreadsheet ID (from its URL or get_sheet_metadata). |
| `requests` | object[] | yes | a non-empty list of Sheets v4 Request objects, e.g. updateCells, repeatCell, updateBorders, mergeCells, addBanding, autoResizeDimensions, updateSheetProperties, updateDimensionProperties, insertDimension, deleteDimension, addProtectedRange. Ranges are GridRange objects: the integer sheetId (list_sheet_tabs), a 0-based start*Index and an exclusive end*Index. Colours are {red, green, blue} floats 0–1. |

## Result

- `data.replies` — one reply per request, in order; requests that return nothing get an empty reply, and addSheet's reply carries the new sheetId.
- `data.requestCount` — the number of requests applied.

## Gotchas

- Google applies the requests in order, as one unit: one invalid request fails the whole call and nothing is applied. Request reference: https: //developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate

## Example

- Bold a header row and autofit two columns in one call. sheet_batch_update("1ABC...", [ {"repeatCell": { "range": {"sheetId": 0, "startRowIndex": 0, "endRowIndex": 1, "startColumnIndex": 0, "endColumnIndex": 4}, "cell": {"userEnteredFormat": {"textFormat": {"bold": True}}}, "fields": "userEnteredFormat.textFormat.bold", }}, {"autoResizeDimensions": { "dimensions": {"sheetId": 0, "dimension": "COLUMNS", "startIndex": 0, "endIndex": 4}, }}, ])