format_sheet_range

Set the fill colour, font colour, bold and font size of a range.

writeGoogle Sheets, Docs & Drive

Call it

In an AI client (MCP)

tools/call
{
  "name": "format_sheet_range",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "range_": "<range_>"
  }
}

From code (Tool API)

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

Arguments

NameTypeDescription
spreadsheet_idrequiredstringthe spreadsheet ID (from its URL or get_sheet_metadata).
range_requiredstringA1 notation with sheet name, e.g. 'SP Campaigns!A2:AA2'.
background_colorobject[]RGB floats 0–1, e.g. [0.0589, 0.6197, 0.4393] (#0F9E70). On its own it changes only the fill.
font_colorobject[]bold true/false; font colour as RGB floats 0–1 (e.g. [1, 1, 1] for white); size in points. Each one you pass is set; one you leave out keeps its current value.
boldbooleanbold true/false; font colour as RGB floats 0–1 (e.g. [1, 1, 1] for white); size in points. Each one you pass is set; one you leave out keeps its current value.
font_sizeintegerbold true/false; font colour as RGB floats 0–1 (e.g. [1, 1, 1] for white); size in points. Each one you pass is set; one you leave out keeps its current value.

Result

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

  • Success confirmation.

Gotchas

  • The API truncates each colour channel to a byte, so compute R/255 and round up at the 4th decimal (#28334F → [0.1569, 0.2, 0.3099]). 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. 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.

Example

format_sheet_range("1ABC...", "Sheet1!A1:D1", font_color=[1, 1, 1], bold=True,
                   font_size=10)

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude