paste_sheet_with_format

Write values AND apply uniform format to the same range — saves a round-trip vs calling write_sheet then format_sheet_range.

destructiveGoogle Sheets, Docs & Drive

Call it

In an AI client (MCP)

tools/call
{
  "name": "paste_sheet_with_format",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "range_": "<range_>",
    "values": []
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/paste_sheet_with_format \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheet_id":"<spreadsheet_id>","range_":"<range_>","values":[]}'
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_requiredstringthe whole target block with its tab name ('Summary!A1:D10'). The format lands on exactly this range, so an anchor cell formats only that cell. A range the format step cannot use is refused before anything is written.
valuesrequiredobject[]2D list of values to write. Formulas allowed (USER_ENTERED).
background_colorobject[]RGB list 0.0–1.0, e.g. [1.0, 0.898, 0.4].
font_colorobject[]bold true/false; font colour as RGB floats 0–1; 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; 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; size in points. Each one you pass is set; one you leave out keeps its current value.
number_format_typestring'NUMBER' | 'CURRENCY' | 'PERCENT' | 'DATE' | 'TIME' | 'DATE_TIME' | 'TEXT' | 'SCIENTIFIC'. Optional.
number_format_patternstringSheets pattern string (e.g. '#,##0.00', '$#,##0.00', '0.00%'). Optional.

Result

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

  • data.rowsWritten — the rows written.
  • data.formatApplied — false when no format argument was given.

Gotchas

  • Every range here must name its tab and both ends ('Tab!A1:D10'); a range without a tab ('A1:D10') or with an open end ('Tab!A:D') is refused.

Example

Write 3 currency cells, formatted as bold USD currency.
paste_sheet_with_format("1ABC...", "Summary!B2:B4",
    [[1234.5], [678.9], [42.0]],
    bold=True,
    number_format_type="CURRENCY",
    number_format_pattern="$#,##0.00",
)

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude