Google Sheets
Spreadsheets. Read and write cells and rows, add and manage tabs, format cells, sort and filter, and manage named ranges.
| Property | Value |
|---|---|
| Slug | google_sheets |
| Definition version | 0.1.0 |
| Base URL | https://sheets.googleapis.com/v4 |
| Auth schemes | oauth2 |
| Action tools | 31 |
| By class | 2 read, 23 write, 6 destructive |
| Triggers | 0 |
| Provider rate limit | 60 requests per 1m, per account |
Measured routing accuracy
47 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 31 cases written by hand and 16 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.
| Measure | Cases | Share |
|---|---|---|
| top-1 | 34/47 | 72.3% |
| top-8 | 46/47 | 97.9% |
The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.
Authentication
Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.
oauth2
| Property | Value |
|---|---|
| Authorization URL | https://accounts.google.com/o/oauth2/v2/auth |
| Token URL | https://oauth2.googleapis.com/token |
| Default scopes | https://www.googleapis.com/auth/spreadsheets |
| Refresh tokens | yes, the refresh daemon renews ahead of expiry |
Tools
31 action tools. The catalog-wide slug is google_sheets.<tool>, which is what search_tools returns and call_tool takes.
google_sheets.create_spreadsheet
Create a brand-new Google Sheets spreadsheet with a title. Use when the user wants to make a new spreadsheet, workbook, or sheet document from scratch. Returns the spreadsheet's id and URL, needed by every other tool here. To add more tabs afterward use add_sheet.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
locale | string | no | Locale code, e.g. "en_US". Defaults to the account's locale. |
time_zone | string | no | IANA time zone, e.g. "America/Chicago". |
title | string | yes | Spreadsheet title. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
properties | object | |
properties.locale | string | |
properties.timeZone | string | |
properties.title | string | |
sheets | array of object | |
sheets[].properties | object | |
sheets[].properties.index | integer | |
sheets[].properties.sheetId | integer | |
sheets[].properties.title | string | |
spreadsheetId | string | |
spreadsheetUrl | string |
Also retrieved by: "start a new spreadsheet", "make me a fresh workbook to track this", "I need a blank sheet document to fill in", "set up a new sheet for the budget", "spin up a spreadsheet for tracking signups".
google_sheets.get_spreadsheet
Get a Google Sheets spreadsheet's metadata: its title, every sheet (tab) with its numeric id and grid size, and its named ranges. Use when the user asks what tabs a spreadsheet has, needs a sheet's numeric id for another tool, or asks what named ranges exist. Does not return cell contents; use get_values for that.
Class read (reads only). Scopes https://www.googleapis.com/auth/spreadsheets.readonly. Calls GET /spreadsheets/{{params.spreadsheet_id}}.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
include_grid_data | boolean | no | Include every cell's data inline. Slow and large for big sheets; default false. Prefer get_values for cell contents. |
spreadsheet_id | string | yes | Spreadsheet id, from its URL or create_spreadsheet. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
namedRanges | array of object | |
namedRanges[].name | string | |
namedRanges[].namedRangeId | string | |
namedRanges[].range | object | |
namedRanges[].range.endColumnIndex | integer | |
namedRanges[].range.endRowIndex | integer | |
namedRanges[].range.sheetId | integer | |
namedRanges[].range.startColumnIndex | integer | |
namedRanges[].range.startRowIndex | integer | |
properties | object | |
properties.locale | string | |
properties.timeZone | string | |
properties.title | string | |
sheets | array of object | |
sheets[].properties | object | |
sheets[].properties.gridProperties | object | |
sheets[].properties.hidden | boolean | |
sheets[].properties.index | integer | |
sheets[].properties.sheetId | integer | |
sheets[].properties.sheetType | string | |
sheets[].properties.title | string | |
spreadsheetId | string | |
spreadsheetUrl | string |
Also retrieved by: "what tabs does this workbook have", "show me the layout of this spreadsheet", "how many rows and columns does this sheet have", "list every tab in this workbook", "what's the numeric id for the second tab".
google_sheets.update_spreadsheet_properties
Rename a Google Sheets spreadsheet's title. Use when the user wants to rename, retitle, or relabel a spreadsheet or workbook itself, not one sheet inside it. To rename a tab use update_sheet_properties.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
spreadsheet_id | string | yes | Spreadsheet to rename. |
title | string | yes | New spreadsheet title. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "rename this workbook", "give the whole spreadsheet a new name", "change what this spreadsheet file is called", "retitle the workbook".
google_sheets.get_values
Read the cell values in one range of a Google Sheets spreadsheet, e.g. "Sheet1!A1:D20" or a whole sheet name. Use when the user wants to see, read, check, or look up what's in a range, row, column, or cell. For several separate ranges at once use batch_update_values to write instead; there is no matching bulk read here, call this once per range.
Class read (reads only). Scopes https://www.googleapis.com/auth/spreadsheets.readonly. Calls GET /spreadsheets/{{params.spreadsheet_id}}/values/{{params.range}}.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
major_dimension | string, one of ROWS, COLUMNS | no | Whether each inner array in the result is a row or a column. |
range | string | yes | A1 notation range, e.g. "Sheet1!A1:D20" or "Sheet1" for the whole sheet. |
spreadsheet_id | string | yes | Spreadsheet id. |
value_render_option | string, one of FORMATTED_VALUE, UNFORMATTED_VALUE, FORMULA | no | How values are rendered. FORMATTED_VALUE (default) applies number and date formatting; FORMULA returns "=SUM(A1:A5)" style text instead of the computed result. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
majorDimension | string | |
range | string | |
values | array of array |
Also retrieved by: "what's in cells A1 through D20", "pull the numbers out of this range", "show me what's written in that block of cells", "read back the data in this row", "check what's stored in column C", "look up what's in this cell".
google_sheets.update_values
Overwrite the cell values in one range of a Google Sheets spreadsheet, replacing whatever was there. Use when the user wants to set, write, fill in, or overwrite specific cells or a block of cells with new values. For adding new rows after existing data without touching what's already there use append_values instead.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls PUT /spreadsheets/{{params.spreadsheet_id}}/values/{{params.range}}.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
range | string | yes | A1 notation range to overwrite, e.g. "Sheet1!A1:C3". |
spreadsheet_id | string | yes | Spreadsheet id. |
value_input_option | string, one of RAW, USER_ENTERED | yes | How to read the values. Google requires this; there is no default. RAW stores values exactly as given. USER_ENTERED parses them like typed input, so "1/2/26" becomes a date and "=A1+A2" becomes a formula. |
values | array of array | yes | Rows of cell values, each inner array one row, e.g. [["Name", "Total"], ["Sam", 42]]. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string | |
updatedCells | integer | |
updatedColumns | integer | |
updatedRange | string | |
updatedRows | integer |
Also retrieved by: "overwrite that block of cells with new numbers", "replace what's in this range", "set these cells to a new price", "fill in this row with the correct figures", "stomp over the old data in this range with new data".
google_sheets.append_values
Add one or more new rows to the end of a table in a Google Sheets spreadsheet, without overwriting anything already there. Use when the user wants to add, insert, log, or record new rows or entries at the bottom of a sheet, e.g. logging a form submission, an order, or a batch of records. Google finds the end of the existing data in the given range and appends after it. For overwriting specific cells that already have data use update_values instead.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}/values/{{params.range}}:append.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
insert_data_option | string, one of OVERWRITE, INSERT_ROWS | no | INSERT_ROWS (default) shifts rows down to make room for the new data. OVERWRITE writes into existing rows past the table's current end instead of inserting. |
range | string | yes | A1 notation range or sheet name identifying the table to append after, e.g. "Sheet1!A1" or "Sheet1". |
spreadsheet_id | string | yes | Spreadsheet id. |
value_input_option | string, one of RAW, USER_ENTERED | yes | How to read the values. Google requires this; there is no default. RAW stores values exactly as given. USER_ENTERED parses them like typed input, so dates and formulas resolve. |
values | array of array | yes | Rows to add, each inner array one new row, e.g. [["Sam", "Widget", 3], ["Alex", "Gadget", 1]]. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string | |
tableRange | string | |
updates | object | |
updates.updatedCells | integer | |
updates.updatedColumns | integer | |
updates.updatedRange | string | |
updates.updatedRows | integer |
Also retrieved by: "log this order at the bottom of the tracker", "add a new row for today's submission", "drop this record onto the end of the table", "record these entries in the sheet", "throw a new line onto the sign-up list", "stick another row on the bottom of this table".
google_sheets.batch_update_values
Write values into several separate ranges of a Google Sheets spreadsheet in one call, each range with its own block of values. Use when the user wants to update multiple non-adjacent blocks or cell groups at once rather than one contiguous range. For one contiguous range use update_values; for adding new rows at the bottom use append_values.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}/values:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
data | array of object | yes | One entry per range to write. |
data[].range | string | yes | A1 notation range, e.g. "Sheet1!A1:B2". |
data[].values | array of array | yes | |
spreadsheet_id | string | yes | Spreadsheet id. |
value_input_option | string, one of RAW, USER_ENTERED | no | RAW stores values exactly as given. USER_ENTERED (default) parses them. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
responses | array of object | |
responses[].updatedCells | integer | |
responses[].updatedColumns | integer | |
responses[].updatedRange | string | |
responses[].updatedRows | integer | |
spreadsheetId | string | |
totalUpdatedCells | integer | |
totalUpdatedColumns | integer | |
totalUpdatedRows | integer | |
totalUpdatedSheets | integer |
Also retrieved by: "fill in several different blocks of cells in one shot", "update a bunch of scattered cell groups at once", "write into these three separate areas at the same time", "push updates into multiple ranges together".
google_sheets.clear_values
Erase every value in one range of a Google Sheets spreadsheet, keeping the cells and their formatting. Use when the user wants to clear, empty, blank out, or wipe the contents of a range or block of cells. Irreversible; formatting, borders, and validation stay. To remove the row or column itself, not just its contents, use delete_dimension.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}/values/{{params.range}}:clear.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
range | string | yes | A1 notation range to erase, e.g. "Sheet1!A2:D100". |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
clearedRange | string | |
spreadsheetId | string |
Also retrieved by: "wipe out what's in this range", "empty this block of cells", "blank out the old numbers here", "erase the contents of this row", "dump everything out of these cells".
google_sheets.batch_clear_values
Erase every value across several separate ranges of a Google Sheets spreadsheet in one call. Use when the user wants to clear, empty, or wipe more than one block of cells at once. Irreversible; formatting stays. For one contiguous range use clear_values.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}/values:batchClear.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
ranges | array of string | yes | A1 notation ranges to erase, e.g. ["Sheet1!A2:D100", "Sheet2!A1:A50"]. |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
clearedRanges | array of string | |
spreadsheetId | string |
Also retrieved by: "wipe several ranges at once", "empty out these different blocks of cells together", "clear out multiple sections in one go", "blank several parts of the sheet at the same time".
google_sheets.add_sheet
Add a new sheet (tab) to an existing Google Sheets spreadsheet. Use when the user wants a new tab, worksheet, or page inside a spreadsheet they already have. Returns the new sheet's numeric id, needed by formatting, deleting, or duplicating tools. To create a whole new spreadsheet use create_spreadsheet.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
column_count | integer | no | Starting number of columns. Defaults to 26. |
index | integer | no | Position among existing tabs, 0-based. Omit to add at the end. |
row_count | integer | no | Starting number of rows. Defaults to 1000. |
spreadsheet_id | string | yes | Spreadsheet to add the tab to. |
title | string | yes | New tab's title. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
replies | array of object | |
replies[].addSheet | object | |
replies[].addSheet.properties | object | |
spreadsheetId | string |
Also retrieved by: "give this workbook a new tab", "I need another worksheet in here", "add a fresh page to this file", "make a new tab called Q3".
google_sheets.delete_sheet
Permanently remove a sheet (tab) and everything on it from a Google Sheets spreadsheet, by its numeric sheet id. Use when the user wants to delete or remove a whole tab or worksheet, not just clear its contents. Unrecoverable and cannot target the spreadsheet's only remaining sheet. Get the sheet id from get_spreadsheet first.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
sheet_id | integer | yes | Numeric sheet id to delete, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet the tab lives in. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "get rid of this tab entirely", "remove that whole worksheet", "I don't need this page in the workbook anymore", "trash the second tab".
google_sheets.duplicate_sheet
Make a copy of an existing sheet (tab) inside the same Google Sheets spreadsheet, values and formatting included. Use when the user wants to duplicate, clone, or copy a tab as a starting point for a new one. To copy a tab into a different spreadsheet entirely use copy_sheet_to_spreadsheet.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
insert_sheet_index | integer | no | Position for the new tab, 0-based. Omit to add at the end. |
new_sheet_name | string | no | Title for the new tab. Defaults to "Copy of <original>". |
source_sheet_id | integer | yes | Numeric sheet id to copy, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet containing the tab. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
replies | array of object | |
replies[].duplicateSheet | object | |
replies[].duplicateSheet.properties | object | |
spreadsheetId | string |
Also retrieved by: "clone this tab", "make a copy of this worksheet to work from", "duplicate the template page", "copy this tab so I can edit the copy".
google_sheets.copy_sheet_to_spreadsheet
Copy one sheet (tab) from one Google Sheets spreadsheet into a different destination spreadsheet. Use when the user wants to move or copy a tab's contents into another, separate spreadsheet file. To duplicate a tab inside the same spreadsheet use duplicate_sheet.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}/sheets/{{params.sheet_id}}:copyTo.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
destination_spreadsheet_id | string | yes | Spreadsheet id to copy the tab into. |
sheet_id | integer | yes | Numeric id of the tab to copy, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet the source tab lives in. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
index | integer | |
sheetId | integer | |
sheetType | string | |
title | string |
Also retrieved by: "send this tab over to a different workbook", "move this worksheet's contents into another file", "copy this page into my other spreadsheet", "put a copy of this tab in a separate document".
google_sheets.update_sheet_properties
Rename a sheet (tab), change its tab color, or hide or show it, inside a Google Sheets spreadsheet. Use when the user wants to rename, recolor, hide, or unhide a tab. Restates the tab's whole set of display properties, so pass every property the user wants kept, not only the one being changed; read current ones with get_spreadsheet first if unsure. To rename the spreadsheet itself use update_spreadsheet_properties.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
hidden | boolean | no | Whether the tab is hidden from the tab bar. |
sheet_id | integer | yes | Numeric sheet id to update, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet containing the tab. |
tab_color | object | no | New tab color. |
tab_color.blue | number | no | |
tab_color.green | number | no | |
tab_color.red | number | no | |
title | string | no | New tab title. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "rename this tab", "change the color of this worksheet tab", "hide this page from the tab bar", "unhide that worksheet", "give the tab a different label".
google_sheets.insert_dimension
Insert new empty rows or columns into a sheet at a given position, shifting existing rows or columns after it. Use when the user wants to insert, add, or make room for new rows or columns in the middle of a sheet, not append data at the end. For adding data rows at the bottom of a table use append_values instead.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
dimension | string, one of ROWS, COLUMNS | yes | Whether to insert rows or columns. |
end_index | integer | yes | Exclusive end index; end_index minus start_index is how many rows or columns are inserted. |
inherit_from_before | boolean | no | New rows or columns copy formatting from the one before the insertion point rather than the one after. Default false. |
sheet_id | integer | yes | Numeric sheet id, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet id. |
start_index | integer | yes | 0-based index of the first row or column to insert before. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "stick a few blank rows in above this one", "make room for a new column here", "squeeze an extra row in between these two", "open up space for more columns".
google_sheets.delete_dimension
Permanently remove whole rows or columns from a sheet, along with everything in them, shifting later rows or columns up or left. Use when the user wants to delete a row, delete a column, or remove whole rows or columns, not just clear their contents. Unrecoverable. To clear cell contents but keep the row or column use clear_values.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
dimension | string, one of ROWS, COLUMNS | yes | Whether to delete rows or columns. |
end_index | integer | yes | Exclusive end index of the range to remove. |
sheet_id | integer | yes | Numeric sheet id, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet id. |
start_index | integer | yes | 0-based index of the first row or column to remove. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "get rid of this whole row", "remove that column entirely", "drop these rows from the sheet", "take out column B completely".
google_sheets.move_dimension
Move a contiguous block of rows or columns to a different position in the same sheet. Use when the user wants to reorder, move, or relocate rows or columns, e.g. moving a row to the top or a column next to another one.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
destination_index | integer | yes | 0-based index to move the block to, counted before the move. |
dimension | string, one of ROWS, COLUMNS | yes | Whether rows or columns are being moved. |
end_index | integer | yes | Exclusive end index of the block being moved. |
sheet_id | integer | yes | Numeric sheet id, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet id. |
start_index | integer | yes | 0-based index of the first row or column to move. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "shift this row up to the top", "move that column next to the totals", "reorder these rows", "relocate this column somewhere else".
google_sheets.auto_resize_dimension
Resize rows or columns to fit their content automatically. Use when the user wants columns or rows to auto-fit, resize to content, or stop truncating text, rather than setting an exact pixel size.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
dimension | string, one of ROWS, COLUMNS | yes | Whether to resize rows or columns. |
end_index | integer | yes | Exclusive end index of the range to resize. |
sheet_id | integer | yes | Numeric sheet id, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet id. |
start_index | integer | yes | 0-based index of the first row or column to resize. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "make these columns fit their text", "stop the text from getting cut off in this column", "auto-fit the row heights", "resize everything to match the content".
google_sheets.format_cells
Apply visual formatting to a block of cells: bold or italic text, font size, text color, background color, number format, or alignment. Use when the user wants to style, format, bold, color, or highlight cells, or set a number or currency format. Replaces the cells' whole format, so include every style the user wants kept, not just the one changing.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
format | object | yes | The complete cell format to apply, e.g. {"backgroundColor": {"red": 1, "green": 0.9, "blue": 0.6}, "textFormat": {"bold": true}}. |
format.backgroundColor | object | no | |
format.backgroundColor.blue | number | no | |
format.backgroundColor.green | number | no | |
format.backgroundColor.red | number | no | |
format.horizontalAlignment | string, one of LEFT, CENTER, RIGHT | no | |
format.numberFormat | object | no | |
format.numberFormat.pattern | string | no | |
format.numberFormat.type | string | no | |
format.textFormat | object | no | |
format.textFormat.bold | boolean | no | |
format.textFormat.fontSize | integer | no | |
format.textFormat.foregroundColor | object | no | |
format.textFormat.italic | boolean | no | |
range | object | yes | Cell range to format. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "make this text bold", "color the background of these cells yellow", "turn this into currency formatting", "style this header row", "center-align this block".
google_sheets.merge_cells
Merge a block of cells into one. Use when the user wants to merge, combine, or join cells together, e.g. for a header spanning several columns. To split merged cells back apart use unmerge_cells.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
merge_type | string, one of MERGE_ALL, MERGE_COLUMNS, MERGE_ROWS | no | MERGE_ALL (default) makes one cell. MERGE_COLUMNS or MERGE_ROWS merges each column or row in the range separately. |
range | object | yes | Cell block to merge. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "combine these cells into one", "join this row of cells together for the title", "make this header span across the columns".
google_sheets.unmerge_cells
Split previously merged cells back into individual cells. Use when the user wants to unmerge, split, or undo a merge on a block of cells. The reverse of merge_cells.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
range | object | yes | Cell block to unmerge. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "split that merged cell back apart", "undo the merge on this block", "break these joined cells back into separate ones".
google_sheets.update_borders
Add or change the border lines around a block of cells: top, bottom, left, right, or the lines between cells. Use when the user wants to add, change, or remove borders, gridlines, or box outlines on a range.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
bottom | object | no | Border along the bottom edge. |
bottom.color | object | no | |
bottom.color.blue | number | no | |
bottom.color.green | number | no | |
bottom.color.red | number | no | |
bottom.style | string, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONE | no | |
left | object | no | Border along the left edge. |
left.color | object | no | |
left.color.blue | number | no | |
left.color.green | number | no | |
left.color.red | number | no | |
left.style | string, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONE | no | |
range | object | yes | Cell range the borders apply to. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
right | object | no | Border along the right edge. |
right.color | object | no | |
right.color.blue | number | no | |
right.color.green | number | no | |
right.color.red | number | no | |
right.style | string, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONE | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
top | object | no | Border along the top edge. |
top.color | object | no | |
top.color.blue | number | no | |
top.color.green | number | no | |
top.color.red | number | no | |
top.style | string, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONE | no |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "put a box around this table", "add a line under the header row", "draw borders around this range", "remove the border on the left side".
google_sheets.sort_range
Sort the rows in a range by one or more columns, ascending or descending. Use when the user wants to sort, order, arrange, or rank rows of data by a column, e.g. sort by date or by amount.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
range | object | yes | Rows and columns to sort, including any header row to sort with them. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
sort_specs | array of object | yes | Sort keys in priority order. |
sort_specs[].dimensionIndex | integer | yes | 0-based column index within the sheet to sort by. |
sort_specs[].sortOrder | string, one of ASCENDING, DESCENDING | yes | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "order these rows by the date column", "arrange this data from highest to lowest", "sort the table by last name", "rank these rows by total spent".
google_sheets.find_replace
Find and replace text across a sheet or a whole spreadsheet. Use when the user wants to find and replace, substitute, or swap out text or values wherever they appear. Set sheet_id to limit the search to one tab, or all_sheets true to search every tab; not both.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
all_sheets | boolean | no | Search every tab in the spreadsheet. Default false. |
find | string | yes | Text to search for. |
include_formulas | boolean | no | Search inside formula text as well as displayed values. Default false. |
match_case | boolean | no | Case-sensitive matching. Default false. |
match_entire_cell | boolean | no | Only replace when the whole cell equals find. Default false. |
replacement | string | yes | Text to replace matches with. |
search_by_regex | boolean | no | Treat find as a regular expression. Default false. |
sheet_id | integer | no | Restrict the search to one tab, by numeric sheet id. |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
replies | array of object | |
replies[].findReplace | object | |
replies[].findReplace.formulasChanged | integer | |
replies[].findReplace.occurrencesChanged | integer | |
replies[].findReplace.rowsChanged | integer | |
replies[].findReplace.sheetsChanged | integer | |
replies[].findReplace.valuesChanged | integer | |
spreadsheetId | string |
Also retrieved by: "swap out every old name for the new one", "search this sheet for a value and replace it", "fix a typo everywhere it shows up", "replace an old product name across every tab".
google_sheets.set_basic_filter
Turn on a filter over a range so columns can be filtered and sorted from the sheet's own filter menus. Use when the user wants to add a filter, filter view, or turn on filtering for a table. To remove it use clear_basic_filter.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
range | object | yes | Range the filter covers, header row included. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "turn on filtering for this table", "let me filter this range from the sheet", "add filter arrows to the header row".
google_sheets.clear_basic_filter
Turn off the filter on a sheet, by its numeric sheet id. Use when the user wants to remove, turn off, or clear a filter or filter view. Does not delete any data, only the filter itself.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
sheet_id | integer | yes | Numeric sheet id the filter is on, from get_spreadsheet. |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "turn off the filter on this tab", "remove the filter dropdowns", "stop filtering this sheet".
google_sheets.add_conditional_format_rule
Add a conditional formatting rule that colors or styles cells automatically when they meet a condition. Use when the user wants cells to highlight, change color, or format automatically based on their value, e.g. highlight overdue dates or numbers over a threshold.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
condition_type | string | yes | Condition type, e.g. "NUMBER_GREATER", "TEXT_CONTAINS", "DATE_BEFORE", or "CUSTOM_FORMULA". |
condition_values | array of object | no | Values the condition compares against, e.g. [{"userEnteredValue": "100"}]. |
condition_values[].userEnteredValue | string | no | |
format | object | yes | Format applied when a cell matches, e.g. background color. |
format.backgroundColor | object | no | |
format.backgroundColor.blue | number | no | |
format.backgroundColor.green | number | no | |
format.backgroundColor.red | number | no | |
format.textFormat | object | no | |
format.textFormat.bold | boolean | no | |
format.textFormat.foregroundColor | object | no | |
index | integer | no | Position among existing rules, 0-based. Omit to add last. |
ranges | array of object | yes | One or more cell ranges the rule watches. |
ranges[].endColumnIndex | integer | no | |
ranges[].endRowIndex | integer | no | |
ranges[].sheetId | integer | yes | |
ranges[].startColumnIndex | integer | no | |
ranges[].startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "highlight cells over a certain number automatically", "color any overdue dates red", "make cells change color when they hit a threshold", "flag negative numbers automatically".
google_sheets.add_named_range
Give a cell range a name that formulas and other tools can refer to instead of its A1 address. Use when the user wants to name, label, or define a named range for a block of cells. Returns the new named range's id, needed by delete_named_range.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Name for the range, e.g. "TaxRates". |
range | object | yes | Cells the name refers to. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
replies | array of object | |
replies[].addNamedRange | object | |
replies[].addNamedRange.namedRange | object | |
spreadsheetId | string |
Also retrieved by: "give this block of cells a name I can reference", "label this range so formulas can call it directly", "define a shortcut name for these cells".
google_sheets.delete_named_range
Remove a named range's definition by its id, without touching the cells themselves. Use when the user wants to remove, delete, or undefine a named range. Any formula elsewhere that refers to the name breaks; get the id from get_spreadsheet first.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
named_range_id | string | yes | Named range id, from get_spreadsheet or add_named_range. |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "get rid of that named range", "remove the label on this range", "undefine that named block of cells".
google_sheets.add_protected_range
Lock a range of cells so only specific people can edit it. Use when the user wants to protect, lock, or restrict editing on a range of cells, e.g. keeping a formula section safe from accidental changes. warning_only shows a caution instead of actually blocking edits.
Class write (writes, no confirmation needed). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
description | string | no | Free-text note on why the range is protected. |
editors | object | no | Who may still edit the protected range. |
editors.groups | array of string | no | Group email addresses allowed to edit. |
editors.users | array of string | no | Email addresses allowed to edit. |
range | object | yes | Cells to protect. |
range.endColumnIndex | integer | no | |
range.endRowIndex | integer | no | |
range.sheetId | integer | yes | |
range.startColumnIndex | integer | no | |
range.startRowIndex | integer | no | |
spreadsheet_id | string | yes | Spreadsheet id. |
warning_only | boolean | no | Show an "are you sure" warning instead of fully blocking edits. Default false, which fully blocks anyone not listed as an editor. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
replies | array of object | |
replies[].addProtectedRange | object | |
replies[].addProtectedRange.protectedRange | object | |
spreadsheetId | string |
Also retrieved by: "lock this range so nobody else can edit it", "restrict editing on these cells to just me", "keep this formula section from being changed by accident", "protect this block from other editors".
google_sheets.delete_protected_range
Remove a protected range's lock by its id, opening those cells back up to anyone with edit access to the sheet. Use when the user wants to unprotect, unlock, or remove editing restrictions from a range. Get the id from get_spreadsheet first.
Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes https://www.googleapis.com/auth/spreadsheets. Calls POST /spreadsheets/{{params.spreadsheet_id}}:batchUpdate.
Arguments:
| Argument | Type | Required | Notes |
|---|---|---|---|
protected_range_id | integer | yes | Protected range id, from get_spreadsheet or add_protected_range. |
spreadsheet_id | string | yes | Spreadsheet id. |
Result fields (the payload is trimmed to these before it reaches the model):
| Field | Type | Notes |
|---|---|---|
spreadsheetId | string |
Also retrieved by: "open this range back up for editing", "unlock those protected cells", "remove the edit restriction on this range".