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)
{
"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
| Name | Type | Description |
|---|---|---|
spreadsheet_idrequired | string | the spreadsheet ID (from its URL or get_sheet_metadata). |
range_required | string | the 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. |
valuesrequired | object[] | 2D list of values to write. Formulas allowed (USER_ENTERED). |
background_color | object[] | RGB list 0.0–1.0, e.g. [1.0, 0.898, 0.4]. |
font_color | object[] | 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. |
bold | boolean | 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. |
font_size | integer | 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. |
number_format_type | string | 'NUMBER' | 'CURRENCY' | 'PERCENT' | 'DATE' | 'TIME' | 'DATE_TIME' | 'TEXT' | 'SCIENTIFIC'. Optional. |
number_format_pattern | string | Sheets 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",
)