atmon docs

REFERENCE/TOOLKITS/GOOGLE_SHEETS.MD

Google Sheets

Spreadsheets. Read and write cells and rows, add and manage tabs, format cells, sort and filter, and manage named ranges.

PropertyValue
Sluggoogle_sheets
Definition version0.1.0
Base URLhttps://sheets.googleapis.com/v4
Auth schemesoauth2
Action tools31
By class2 read, 23 write, 6 destructive
Triggers0
Provider rate limit60 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.

MeasureCasesShare
top-134/4772.3%
top-846/4797.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

PropertyValue
Authorization URLhttps://accounts.google.com/o/oauth2/v2/auth
Token URLhttps://oauth2.googleapis.com/token
Default scopeshttps://www.googleapis.com/auth/spreadsheets
Refresh tokensyes, 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:

ArgumentTypeRequiredNotes
localestringnoLocale code, e.g. "en_US". Defaults to the account's locale.
time_zonestringnoIANA time zone, e.g. "America/Chicago".
titlestringyesSpreadsheet title.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
propertiesobject
properties.localestring
properties.timeZonestring
properties.titlestring
sheetsarray of object
sheets[].propertiesobject
sheets[].properties.indexinteger
sheets[].properties.sheetIdinteger
sheets[].properties.titlestring
spreadsheetIdstring
spreadsheetUrlstring

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:

ArgumentTypeRequiredNotes
include_grid_databooleannoInclude every cell's data inline. Slow and large for big sheets; default false. Prefer get_values for cell contents.
spreadsheet_idstringyesSpreadsheet id, from its URL or create_spreadsheet.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
namedRangesarray of object
namedRanges[].namestring
namedRanges[].namedRangeIdstring
namedRanges[].rangeobject
namedRanges[].range.endColumnIndexinteger
namedRanges[].range.endRowIndexinteger
namedRanges[].range.sheetIdinteger
namedRanges[].range.startColumnIndexinteger
namedRanges[].range.startRowIndexinteger
propertiesobject
properties.localestring
properties.timeZonestring
properties.titlestring
sheetsarray of object
sheets[].propertiesobject
sheets[].properties.gridPropertiesobject
sheets[].properties.hiddenboolean
sheets[].properties.indexinteger
sheets[].properties.sheetIdinteger
sheets[].properties.sheetTypestring
sheets[].properties.titlestring
spreadsheetIdstring
spreadsheetUrlstring

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:

ArgumentTypeRequiredNotes
spreadsheet_idstringyesSpreadsheet to rename.
titlestringyesNew spreadsheet title.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
major_dimensionstring, one of ROWS, COLUMNSnoWhether each inner array in the result is a row or a column.
rangestringyesA1 notation range, e.g. "Sheet1!A1:D20" or "Sheet1" for the whole sheet.
spreadsheet_idstringyesSpreadsheet id.
value_render_optionstring, one of FORMATTED_VALUE, UNFORMATTED_VALUE, FORMULAnoHow 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):

FieldTypeNotes
majorDimensionstring
rangestring
valuesarray 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:

ArgumentTypeRequiredNotes
rangestringyesA1 notation range to overwrite, e.g. "Sheet1!A1:C3".
spreadsheet_idstringyesSpreadsheet id.
value_input_optionstring, one of RAW, USER_ENTEREDyesHow 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.
valuesarray of arrayyesRows 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):

FieldTypeNotes
spreadsheetIdstring
updatedCellsinteger
updatedColumnsinteger
updatedRangestring
updatedRowsinteger

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:

ArgumentTypeRequiredNotes
insert_data_optionstring, one of OVERWRITE, INSERT_ROWSnoINSERT_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.
rangestringyesA1 notation range or sheet name identifying the table to append after, e.g. "Sheet1!A1" or "Sheet1".
spreadsheet_idstringyesSpreadsheet id.
value_input_optionstring, one of RAW, USER_ENTEREDyesHow 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.
valuesarray of arrayyesRows 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):

FieldTypeNotes
spreadsheetIdstring
tableRangestring
updatesobject
updates.updatedCellsinteger
updates.updatedColumnsinteger
updates.updatedRangestring
updates.updatedRowsinteger

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:

ArgumentTypeRequiredNotes
dataarray of objectyesOne entry per range to write.
data[].rangestringyesA1 notation range, e.g. "Sheet1!A1:B2".
data[].valuesarray of arrayyes
spreadsheet_idstringyesSpreadsheet id.
value_input_optionstring, one of RAW, USER_ENTEREDnoRAW stores values exactly as given. USER_ENTERED (default) parses them.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
responsesarray of object
responses[].updatedCellsinteger
responses[].updatedColumnsinteger
responses[].updatedRangestring
responses[].updatedRowsinteger
spreadsheetIdstring
totalUpdatedCellsinteger
totalUpdatedColumnsinteger
totalUpdatedRowsinteger
totalUpdatedSheetsinteger

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:

ArgumentTypeRequiredNotes
rangestringyesA1 notation range to erase, e.g. "Sheet1!A2:D100".
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
clearedRangestring
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
rangesarray of stringyesA1 notation ranges to erase, e.g. ["Sheet1!A2:D100", "Sheet2!A1:A50"].
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
clearedRangesarray of string
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
column_countintegernoStarting number of columns. Defaults to 26.
indexintegernoPosition among existing tabs, 0-based. Omit to add at the end.
row_countintegernoStarting number of rows. Defaults to 1000.
spreadsheet_idstringyesSpreadsheet to add the tab to.
titlestringyesNew tab's title.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
repliesarray of object
replies[].addSheetobject
replies[].addSheet.propertiesobject
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
sheet_idintegeryesNumeric sheet id to delete, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet the tab lives in.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
insert_sheet_indexintegernoPosition for the new tab, 0-based. Omit to add at the end.
new_sheet_namestringnoTitle for the new tab. Defaults to "Copy of <original>".
source_sheet_idintegeryesNumeric sheet id to copy, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet containing the tab.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
repliesarray of object
replies[].duplicateSheetobject
replies[].duplicateSheet.propertiesobject
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
destination_spreadsheet_idstringyesSpreadsheet id to copy the tab into.
sheet_idintegeryesNumeric id of the tab to copy, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet the source tab lives in.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
indexinteger
sheetIdinteger
sheetTypestring
titlestring

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:

ArgumentTypeRequiredNotes
hiddenbooleannoWhether the tab is hidden from the tab bar.
sheet_idintegeryesNumeric sheet id to update, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet containing the tab.
tab_colorobjectnoNew tab color.
tab_color.bluenumberno
tab_color.greennumberno
tab_color.rednumberno
titlestringnoNew tab title.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
dimensionstring, one of ROWS, COLUMNSyesWhether to insert rows or columns.
end_indexintegeryesExclusive end index; end_index minus start_index is how many rows or columns are inserted.
inherit_from_beforebooleannoNew rows or columns copy formatting from the one before the insertion point rather than the one after. Default false.
sheet_idintegeryesNumeric sheet id, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet id.
start_indexintegeryes0-based index of the first row or column to insert before.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
dimensionstring, one of ROWS, COLUMNSyesWhether to delete rows or columns.
end_indexintegeryesExclusive end index of the range to remove.
sheet_idintegeryesNumeric sheet id, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet id.
start_indexintegeryes0-based index of the first row or column to remove.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
destination_indexintegeryes0-based index to move the block to, counted before the move.
dimensionstring, one of ROWS, COLUMNSyesWhether rows or columns are being moved.
end_indexintegeryesExclusive end index of the block being moved.
sheet_idintegeryesNumeric sheet id, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet id.
start_indexintegeryes0-based index of the first row or column to move.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
dimensionstring, one of ROWS, COLUMNSyesWhether to resize rows or columns.
end_indexintegeryesExclusive end index of the range to resize.
sheet_idintegeryesNumeric sheet id, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet id.
start_indexintegeryes0-based index of the first row or column to resize.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
formatobjectyesThe complete cell format to apply, e.g. {"backgroundColor": {"red": 1, "green": 0.9, "blue": 0.6}, "textFormat": {"bold": true}}.
format.backgroundColorobjectno
format.backgroundColor.bluenumberno
format.backgroundColor.greennumberno
format.backgroundColor.rednumberno
format.horizontalAlignmentstring, one of LEFT, CENTER, RIGHTno
format.numberFormatobjectno
format.numberFormat.patternstringno
format.numberFormat.typestringno
format.textFormatobjectno
format.textFormat.boldbooleanno
format.textFormat.fontSizeintegerno
format.textFormat.foregroundColorobjectno
format.textFormat.italicbooleanno
rangeobjectyesCell range to format.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
merge_typestring, one of MERGE_ALL, MERGE_COLUMNS, MERGE_ROWSnoMERGE_ALL (default) makes one cell. MERGE_COLUMNS or MERGE_ROWS merges each column or row in the range separately.
rangeobjectyesCell block to merge.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
rangeobjectyesCell block to unmerge.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
bottomobjectnoBorder along the bottom edge.
bottom.colorobjectno
bottom.color.bluenumberno
bottom.color.greennumberno
bottom.color.rednumberno
bottom.stylestring, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONEno
leftobjectnoBorder along the left edge.
left.colorobjectno
left.color.bluenumberno
left.color.greennumberno
left.color.rednumberno
left.stylestring, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONEno
rangeobjectyesCell range the borders apply to.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
rightobjectnoBorder along the right edge.
right.colorobjectno
right.color.bluenumberno
right.color.greennumberno
right.color.rednumberno
right.stylestring, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONEno
spreadsheet_idstringyesSpreadsheet id.
topobjectnoBorder along the top edge.
top.colorobjectno
top.color.bluenumberno
top.color.greennumberno
top.color.rednumberno
top.stylestring, one of DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE, NONEno

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
rangeobjectyesRows and columns to sort, including any header row to sort with them.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
sort_specsarray of objectyesSort keys in priority order.
sort_specs[].dimensionIndexintegeryes0-based column index within the sheet to sort by.
sort_specs[].sortOrderstring, one of ASCENDING, DESCENDINGyes
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
all_sheetsbooleannoSearch every tab in the spreadsheet. Default false.
findstringyesText to search for.
include_formulasbooleannoSearch inside formula text as well as displayed values. Default false.
match_casebooleannoCase-sensitive matching. Default false.
match_entire_cellbooleannoOnly replace when the whole cell equals find. Default false.
replacementstringyesText to replace matches with.
search_by_regexbooleannoTreat find as a regular expression. Default false.
sheet_idintegernoRestrict the search to one tab, by numeric sheet id.
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
repliesarray of object
replies[].findReplaceobject
replies[].findReplace.formulasChangedinteger
replies[].findReplace.occurrencesChangedinteger
replies[].findReplace.rowsChangedinteger
replies[].findReplace.sheetsChangedinteger
replies[].findReplace.valuesChangedinteger
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
rangeobjectyesRange the filter covers, header row included.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
sheet_idintegeryesNumeric sheet id the filter is on, from get_spreadsheet.
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
condition_typestringyesCondition type, e.g. "NUMBER_GREATER", "TEXT_CONTAINS", "DATE_BEFORE", or "CUSTOM_FORMULA".
condition_valuesarray of objectnoValues the condition compares against, e.g. [{"userEnteredValue": "100"}].
condition_values[].userEnteredValuestringno
formatobjectyesFormat applied when a cell matches, e.g. background color.
format.backgroundColorobjectno
format.backgroundColor.bluenumberno
format.backgroundColor.greennumberno
format.backgroundColor.rednumberno
format.textFormatobjectno
format.textFormat.boldbooleanno
format.textFormat.foregroundColorobjectno
indexintegernoPosition among existing rules, 0-based. Omit to add last.
rangesarray of objectyesOne or more cell ranges the rule watches.
ranges[].endColumnIndexintegerno
ranges[].endRowIndexintegerno
ranges[].sheetIdintegeryes
ranges[].startColumnIndexintegerno
ranges[].startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
namestringyesName for the range, e.g. "TaxRates".
rangeobjectyesCells the name refers to.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
repliesarray of object
replies[].addNamedRangeobject
replies[].addNamedRange.namedRangeobject
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
named_range_idstringyesNamed range id, from get_spreadsheet or add_named_range.
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
descriptionstringnoFree-text note on why the range is protected.
editorsobjectnoWho may still edit the protected range.
editors.groupsarray of stringnoGroup email addresses allowed to edit.
editors.usersarray of stringnoEmail addresses allowed to edit.
rangeobjectyesCells to protect.
range.endColumnIndexintegerno
range.endRowIndexintegerno
range.sheetIdintegeryes
range.startColumnIndexintegerno
range.startRowIndexintegerno
spreadsheet_idstringyesSpreadsheet id.
warning_onlybooleannoShow 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):

FieldTypeNotes
repliesarray of object
replies[].addProtectedRangeobject
replies[].addProtectedRange.protectedRangeobject
spreadsheetIdstring

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:

ArgumentTypeRequiredNotes
protected_range_idintegeryesProtected range id, from get_spreadsheet or add_protected_range.
spreadsheet_idstringyesSpreadsheet id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
spreadsheetIdstring

Also retrieved by: "open this range back up for editing", "unlock those protected cells", "remove the edit restriction on this range".