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

> Copy a tab, with all its formatting, into another spreadsheet (or the same one).

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

Its main use is restoring a broken SellerSheet tab (wrong columns, deleted headers, corrupted formatting) from the master template.

## Call it

MCP tool call:

```json
{
  "name": "copy_sheet_tab",
  "arguments": {
    "source_spreadsheet_id": "<source_spreadsheet_id>",
    "sheet_name": "<sheet_name>",
    "dest_spreadsheet_id": "<dest_spreadsheet_id>"
  }
}
```

Tool API (early access — contact us):

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

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `source_spreadsheet_id` | string | yes | Spreadsheet ID to copy from — the SellerSheet master template is 1BVm1knCy_9DZGtCsaD9dKjvRVBMnF2_Vj7kyRiENF40. |
| `sheet_name` | string | yes | the tab name. |
| `dest_spreadsheet_id` | string | yes | Spreadsheet ID to copy into. |
| `keep_rows` | integer |  | after copying, clear the cell values below this row (formats stay). Omit it, or pass 0, to keep everything. E.g. 3 keeps rows 1–3. |

## Result

- `data.sheetId` — the copy's tab id.
- `data.sheetName` — its final name — the source name when copying across spreadsheets, 'Copy of <name>' within one.

## Workflow

- 1. Read data.workspace_config.userSettingBySpreadsheet.storeReportsSpreadsheetId from get_user_context. 2. Call this tool with the master template as source and that id as dest.

## Gotchas

- Across spreadsheets, a tab with the same name in dest is replaced, data included, once the copy has landed, so the fresh copy keeps the name; a failed copy leaves dest as it was. Within one spreadsheet nothing is deleted and Google names the copy 'Copy of <name>' — rename it with rename_sheet_tab. Google's copy (sheets.copyTo) keeps formatting, frozen panes, column widths and hidden rows — unlike read + write. Pass a hyphenated tab name ('STA-BoxFirst') bare — the server quotes it. The spreadsheet must be shared with SellerSheet's Google service account as Editor (workbooks set up by the SellerSheet sidebar already are); a permission error means the user has to share it.