setup_sheet

Create a tab if it is missing, write a key row and a label row, and format them.

writeGoogle Sheets, Docs & Drive

Call it

In an AI client (MCP)

tools/call
{
  "name": "setup_sheet",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "sheet_name": "<sheet_name>",
    "headers": [],
    "labels": []
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/setup_sheet \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheet_id":"<spreadsheet_id>","sheet_name":"<sheet_name>","headers":[],"labels":[]}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
spreadsheet_idrequiredstringthe spreadsheet ID (from its URL or get_sheet_metadata).
sheet_namerequiredstringthe tab name.
headersrequiredobject[]Row 1 key names, e.g. ['storeName', 'reportId', 'processingStatus'].
labelsrequiredobject[]Row 2 display labels, e.g. ['Store Name', 'Report ID', 'Status'].
header_row_colorobject[]RGB list 0.0–1.0 for the default row 2 background. Default: [0.204, 0.659, 0.325] (Google green). Override per-column with format_sheet_range after setup.
hide_row1booleanHide the key-name row. Default: true.Default: true
freeze_rowsintegerNumber of rows to freeze from top. Default: 2.Default: 2

Result

Every tool answers {notification, data, human_action}; data carries:

  • { sheetId: N, created: bool, formatted: true }

Gotchas

  • Writes `headers` to row 1 and `labels` to row 2 as plain text (no formula parsing), hides row 1 when hide_row1 is set, freezes freeze_rows rows, and paints row 2 bold white on header_row_color. An existing tab is reused (created false) and nothing below row 2 is cleared. No cell notes are written; add them with update_sheet_note. The yellow / light-yellow / gray header fills and green label row of older SellerSheet guides are retired; SellerSheet tabs use one navy header band whose font colour marks required, optional and auto columns.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude