copy_sheet_tab
Copy a tab, with all its formatting, into another spreadsheet (or the same one).
writeGoogle Sheets, Docs & Drive
Its main use is restoring a broken SellerSheet tab (wrong columns, deleted headers, corrupted formatting) from the master template.
Call it
In an AI client (MCP)
{
"name": "copy_sheet_tab",
"arguments": {
"source_spreadsheet_id": "<source_spreadsheet_id>",
"sheet_name": "<sheet_name>",
"dest_spreadsheet_id": "<dest_spreadsheet_id>"
}
}From code (Tool API)
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>"}'Early access — the Tool API is open on request, contact us.
Arguments
| Name | Type | Description |
|---|---|---|
source_spreadsheet_idrequired | string | Spreadsheet ID to copy from — the SellerSheet master template is 1BVm1knCy_9DZGtCsaD9dKjvRVBMnF2_Vj7kyRiENF40. |
sheet_namerequired | string | the tab name. |
dest_spreadsheet_idrequired | string | 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
Every tool answers {notification, data, human_action}; data carries:
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.