Google Sheets
GoogleSheets_CreateOrEditSpreadsheet
Create a new spreadsheet or batch-edit an existing one. Omit `spreadsheet_id` to create; provide it to edit. All writes flow through `requests[]` — typed operations like updateCells, addSheet, sortRange, addConditionalFormatRule, autoResizeDimensions, and more. For updateCells use ExtendedValue with an explicit type field (stringValue, numberValue, boolValue, formulaValue). By default, build clean, professional-looking tables with restrained, consistent formatting and plain-text tab names/headers (no emojis); only use emojis or decorative styling when the user explicitly asks for it.
Remote googlesheets
Remote (network-hosted)
Other tools also called GoogleSheets_CreateOrEditSpreadsheet?
See providers with this name
Input Schema
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Title for a newly created spreadsheet. Ignored when spreadsheet_id is provided. Defaults to 'Untitled spreadsheet'."
},
"requests": {
"type": "array",
"items": {
"type": "object",
"properties": {
"addChart": {
"type": "object",
"properties": {
"chart": {
"type": "object",
"properties": {
"spec": {
"type": "object"
},
"chartId": {
"type": "integer"
},
"position": {
"type": "object"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"addSheet": {
"type": "object",
"properties": {
"properties": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"title": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"sheetId": {
"type": "integer"
},
"sheetType": {
"enum": [
"GRID",
"OBJECT",
"DATA_SOURCE"
],
"type": "string"
},
"rightToLeft": {
"type": "boolean"
},
"tabColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
},
"gridProperties": {
"type": "object",
"properties": {
"rowCount": {
"type": "integer"
},
"columnCount": {
"type": "integer"
},
"hideGridlines": {
"type": "boolean"
},
"frozenRowCount": {
"type": "integer"
},
"frozenColumnCount": {
"type": "integer"
},
"rowGroupControlAfter": {
"type": "boolean"
},
"columnGroupControlAfter": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"sortRange": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"sortSpecs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sortOrder": {
"enum": [
"ASCENDING",
"DESCENDING"
],
"type": "string"
},
"dimensionIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"mergeCells": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"mergeType": {
"enum": [
"MERGE_ALL",
"MERGE_COLUMNS",
"MERGE_ROWS"
],
"type": "string"
}
},
"additionalProperties": false
},
"repeatCell": {
"type": "object",
"properties": {
"cell": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"pivotTable": {
"type": "object"
},
"textFormatRuns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"format": {
"type": "object",
"properties": {
"bold": {
"type": "boolean"
},
"link": {
"type": "object"
},
"italic": {
"type": "boolean"
},
"fontSize": {
"type": "integer"
},
"underline": {
"type": "boolean"
},
"fontFamily": {
"type": "string"
},
"strikethrough": {
"type": "boolean"
},
"foregroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"startIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"dataSourceTable": {
"type": "object"
},
"userEnteredValue": {
"type": "object",
"properties": {
"boolValue": {
"type": "boolean"
},
"numberValue": {
"type": "number"
},
"stringValue": {
"type": "string"
},
"formulaValue": {
"type": "string"
}
},
"additionalProperties": false
},
"userEnteredFormat": {
"type": "object",
"properties": {
"borders": {
"type": "object"
},
"padding": {
"type": "object",
"properties": {
"top": {
"type": "integer"
},
"left": {
"type": "integer"
},
"right": {
"type": "integer"
},
"bottom": {
"type": "integer"
}
},
"additionalProperties": false
},
"textFormat": {
"type": "object",
"properties": {
"bold": {
"type": "boolean"
},
"link": {
"type": "object"
},
"italic": {
"type": "boolean"
},
"fontSize": {
"type": "integer"
},
"underline": {
"type": "boolean"
},
"fontFamily": {
"type": "string"
},
"strikethrough": {
"type": "boolean"
},
"foregroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"numberFormat": {
"type": "object",
"properties": {
"type": {
"enum": [
"TEXT",
"NUMBER",
"PERCENT",
"CURRENCY",
"DATE",
"TIME",
"DATE_TIME",
"SCIENTIFIC"
],
"type": "string"
},
"pattern": {
"type": "string"
}
},
"additionalProperties": false
},
"textRotation": {
"type": "object"
},
"wrapStrategy": {
"enum": [
"OVERFLOW_CELL",
"LEGACY_WRAP",
"CLIP",
"WRAP"
],
"type": "string"
},
"textDirection": {
"enum": [
"LEFT_TO_RIGHT",
"RIGHT_TO_LEFT"
],
"type": "string"
},
"verticalAlignment": {
"enum": [
"TOP",
"MIDDLE",
"BOTTOM"
],
"type": "string"
},
"horizontalAlignment": {
"enum": [
"LEFT",
"CENTER",
"RIGHT"
],
"type": "string"
},
"backgroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
},
"hyperlinkDisplayType": {
"enum": [
"LINKED",
"PLAIN_TEXT"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"fields": {
"type": "string"
}
},
"additionalProperties": false
},
"deleteSheet": {
"type": "object",
"required": [
"sheetId"
],
"properties": {
"sheetId": {
"type": "integer"
}
},
"additionalProperties": false
},
"findReplace": {
"type": "object",
"properties": {
"find": {
"type": "string"
},
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"sheetId": {
"type": "integer"
},
"allSheets": {
"type": "boolean"
},
"matchCase": {
"type": "boolean"
},
"replacement": {
"type": "string"
},
"searchByRegex": {
"type": "boolean"
},
"includeFormulas": {
"type": "boolean"
},
"matchEntireCell": {
"type": "boolean"
}
},
"additionalProperties": false
},
"updateCells": {
"type": "object",
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"pivotTable": {
"type": "object"
},
"textFormatRuns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"format": {
"type": "object",
"properties": {
"bold": {
"type": "boolean"
},
"link": {
"type": "object"
},
"italic": {
"type": "boolean"
},
"fontSize": {
"type": "integer"
},
"underline": {
"type": "boolean"
},
"fontFamily": {
"type": "string"
},
"strikethrough": {
"type": "boolean"
},
"foregroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"startIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"dataSourceTable": {
"type": "object"
},
"userEnteredValue": {
"type": "object",
"properties": {
"boolValue": {
"type": "boolean"
},
"numberValue": {
"type": "number"
},
"stringValue": {
"type": "string"
},
"formulaValue": {
"type": "string"
}
},
"additionalProperties": false
},
"userEnteredFormat": {
"type": "object",
"properties": {
"borders": {
"type": "object"
},
"padding": {
"type": "object",
"properties": {
"top": {
"type": "integer"
},
"left": {
"type": "integer"
},
"right": {
"type": "integer"
},
"bottom": {
"type": "integer"
}
},
"additionalProperties": false
},
"textFormat": {
"type": "object",
"properties": {
"bold": {
"type": "boolean"
},
"link": {
"type": "object"
},
"italic": {
"type": "boolean"
},
"fontSize": {
"type": "integer"
},
"underline": {
"type": "boolean"
},
"fontFamily": {
"type": "string"
},
"strikethrough": {
"type": "boolean"
},
"foregroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"numberFormat": {
"type": "object",
"properties": {
"type": {
"enum": [
"TEXT",
"NUMBER",
"PERCENT",
"CURRENCY",
"DATE",
"TIME",
"DATE_TIME",
"SCIENTIFIC"
],
"type": "string"
},
"pattern": {
"type": "string"
}
},
"additionalProperties": false
},
"textRotation": {
"type": "object"
},
"wrapStrategy": {
"enum": [
"OVERFLOW_CELL",
"LEGACY_WRAP",
"CLIP",
"WRAP"
],
"type": "string"
},
"textDirection": {
"enum": [
"LEFT_TO_RIGHT",
"RIGHT_TO_LEFT"
],
"type": "string"
},
"verticalAlignment": {
"enum": [
"TOP",
"MIDDLE",
"BOTTOM"
],
"type": "string"
},
"horizontalAlignment": {
"enum": [
"LEFT",
"CENTER",
"RIGHT"
],
"type": "string"
},
"backgroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
},
"hyperlinkDisplayType": {
"enum": [
"LINKED",
"PLAIN_TEXT"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"start": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"rowIndex": {
"type": "integer"
},
"columnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"fields": {
"type": "string"
}
},
"additionalProperties": false
},
"unmergeCells": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"addNamedRange": {
"type": "object",
"properties": {
"namedRange": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"namedRangeId": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"updateBorders": {
"type": "object",
"properties": {
"top": {
"type": "object",
"properties": {
"style": {
"enum": [
"DOTTED",
"DASHED",
"SOLID",
"SOLID_MEDIUM",
"SOLID_THICK",
"DOUBLE",
"NONE"
],
"type": "string"
},
"colorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"left": {
"type": "object",
"properties": {
"style": {
"enum": [
"DOTTED",
"DASHED",
"SOLID",
"SOLID_MEDIUM",
"SOLID_THICK",
"DOUBLE",
"NONE"
],
"type": "string"
},
"colorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"right": {
"type": "object",
"properties": {
"style": {
"enum": [
"DOTTED",
"DASHED",
"SOLID",
"SOLID_MEDIUM",
"SOLID_THICK",
"DOUBLE",
"NONE"
],
"type": "string"
},
"colorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"bottom": {
"type": "object",
"properties": {
"style": {
"enum": [
"DOTTED",
"DASHED",
"SOLID",
"SOLID_MEDIUM",
"SOLID_THICK",
"DOUBLE",
"NONE"
],
"type": "string"
},
"colorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"innerVertical": {
"type": "object",
"properties": {
"style": {
"enum": [
"DOTTED",
"DASHED",
"SOLID",
"SOLID_MEDIUM",
"SOLID_THICK",
"DOUBLE",
"NONE"
],
"type": "string"
},
"colorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"innerHorizontal": {
"type": "object",
"properties": {
"style": {
"enum": [
"DOTTED",
"DASHED",
"SOLID",
"SOLID_MEDIUM",
"SOLID_THICK",
"DOUBLE",
"NONE"
],
"type": "string"
},
"colorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"duplicateSheet": {
"type": "object",
"properties": {
"newSheetId": {
"type": "integer"
},
"newSheetName": {
"type": "string"
},
"sourceSheetId": {
"type": "integer"
},
"insertSheetIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"deleteDimension": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endIndex": {
"type": "integer"
},
"dimension": {
"enum": [
"ROWS",
"COLUMNS"
],
"type": "string"
},
"startIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"insertDimension": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endIndex": {
"type": "integer"
},
"dimension": {
"enum": [
"ROWS",
"COLUMNS"
],
"type": "string"
},
"startIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"inheritFromBefore": {
"type": "boolean"
}
},
"additionalProperties": false
},
"addProtectedRange": {
"type": "object",
"properties": {
"protectedRange": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"editors": {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"type": "string"
}
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
},
"domainUsersCanEdit": {
"type": "boolean"
}
},
"additionalProperties": false
},
"description": {
"type": "string"
},
"warningOnly": {
"type": "boolean"
},
"namedRangeId": {
"type": "string"
},
"protectedRangeId": {
"type": "integer"
},
"unprotectedRanges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"requestingUserCanEdit": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"setDataValidation": {
"type": "object",
"properties": {
"rule": {
"type": "object",
"properties": {
"strict": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"type": {
"enum": [
"NUMBER_GREATER",
"NUMBER_GREATER_THAN_EQ",
"NUMBER_LESS",
"NUMBER_LESS_THAN_EQ",
"NUMBER_EQ",
"NUMBER_NOT_EQ",
"NUMBER_BETWEEN",
"NUMBER_NOT_BETWEEN",
"TEXT_CONTAINS",
"TEXT_NOT_CONTAINS",
"TEXT_STARTS_WITH",
"TEXT_ENDS_WITH",
"TEXT_EQ",
"TEXT_IS_EMAIL",
"TEXT_IS_URL",
"DATE_EQ",
"DATE_BEFORE",
"DATE_AFTER",
"DATE_ON_OR_BEFORE",
"DATE_ON_OR_AFTER",
"DATE_BETWEEN",
"DATE_NOT_BETWEEN",
"DATE_IS_VALID",
"ONE_OF_RANGE",
"ONE_OF_LIST",
"BLANK",
"NOT_BLANK",
"CUSTOM_FORMULA",
"BOOLEAN"
],
"type": "string"
},
"values": {
"type": "array",
"items": {
"type": "object",
"properties": {
"relativeDate": {
"type": "string"
},
"userEnteredValue": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"inputMessage": {
"type": "string"
},
"showCustomUi": {
"type": "boolean"
}
},
"additionalProperties": false
},
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"filteredRowsIncluded": {
"type": "boolean"
}
},
"additionalProperties": false
},
"autoResizeDimensions": {
"type": "object",
"properties": {
"dimensions": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endIndex": {
"type": "integer"
},
"dimension": {
"enum": [
"ROWS",
"COLUMNS"
],
"type": "string"
},
"startIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"updateSheetProperties": {
"type": "object",
"properties": {
"fields": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"title": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"sheetId": {
"type": "integer"
},
"sheetType": {
"enum": [
"GRID",
"OBJECT",
"DATA_SOURCE"
],
"type": "string"
},
"rightToLeft": {
"type": "boolean"
},
"tabColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
},
"gridProperties": {
"type": "object",
"properties": {
"rowCount": {
"type": "integer"
},
"columnCount": {
"type": "integer"
},
"hideGridlines": {
"type": "boolean"
},
"frozenRowCount": {
"type": "integer"
},
"frozenColumnCount": {
"type": "integer"
},
"rowGroupControlAfter": {
"type": "boolean"
},
"columnGroupControlAfter": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"addConditionalFormatRule": {
"type": "object",
"properties": {
"rule": {
"type": "object",
"properties": {
"ranges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endRowIndex": {
"type": "integer"
},
"startRowIndex": {
"type": "integer"
},
"endColumnIndex": {
"type": "integer"
},
"startColumnIndex": {
"type": "integer"
}
},
"additionalProperties": false
}
},
"booleanRule": {
"type": "object",
"properties": {
"format": {
"type": "object",
"properties": {
"borders": {
"type": "object"
},
"padding": {
"type": "object",
"properties": {
"top": {
"type": "integer"
},
"left": {
"type": "integer"
},
"right": {
"type": "integer"
},
"bottom": {
"type": "integer"
}
},
"additionalProperties": false
},
"textFormat": {
"type": "object",
"properties": {
"bold": {
"type": "boolean"
},
"link": {
"type": "object"
},
"italic": {
"type": "boolean"
},
"fontSize": {
"type": "integer"
},
"underline": {
"type": "boolean"
},
"fontFamily": {
"type": "string"
},
"strikethrough": {
"type": "boolean"
},
"foregroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"numberFormat": {
"type": "object",
"properties": {
"type": {
"enum": [
"TEXT",
"NUMBER",
"PERCENT",
"CURRENCY",
"DATE",
"TIME",
"DATE_TIME",
"SCIENTIFIC"
],
"type": "string"
},
"pattern": {
"type": "string"
}
},
"additionalProperties": false
},
"textRotation": {
"type": "object"
},
"wrapStrategy": {
"enum": [
"OVERFLOW_CELL",
"LEGACY_WRAP",
"CLIP",
"WRAP"
],
"type": "string"
},
"textDirection": {
"enum": [
"LEFT_TO_RIGHT",
"RIGHT_TO_LEFT"
],
"type": "string"
},
"verticalAlignment": {
"enum": [
"TOP",
"MIDDLE",
"BOTTOM"
],
"type": "string"
},
"horizontalAlignment": {
"enum": [
"LEFT",
"CENTER",
"RIGHT"
],
"type": "string"
},
"backgroundColorStyle": {
"type": "object",
"properties": {
"rgbColor": {
"type": "object",
"properties": {
"red": {
"type": "number"
},
"blue": {
"type": "number"
},
"alpha": {
"type": "number"
},
"green": {
"type": "number"
}
},
"additionalProperties": false
},
"themeColor": {
"enum": [
"TEXT",
"BACKGROUND",
"ACCENT1",
"ACCENT2",
"ACCENT3",
"ACCENT4",
"ACCENT5",
"ACCENT6",
"LINK"
],
"type": "string"
}
},
"additionalProperties": false
},
"hyperlinkDisplayType": {
"enum": [
"LINKED",
"PLAIN_TEXT"
],
"type": "string"
}
},
"additionalProperties": false
},
"condition": {
"type": "object",
"properties": {
"type": {
"enum": [
"NUMBER_GREATER",
"NUMBER_GREATER_THAN_EQ",
"NUMBER_LESS",
"NUMBER_LESS_THAN_EQ",
"NUMBER_EQ",
"NUMBER_NOT_EQ",
"NUMBER_BETWEEN",
"NUMBER_NOT_BETWEEN",
"TEXT_CONTAINS",
"TEXT_NOT_CONTAINS",
"TEXT_STARTS_WITH",
"TEXT_ENDS_WITH",
"TEXT_EQ",
"TEXT_IS_EMAIL",
"TEXT_IS_URL",
"DATE_EQ",
"DATE_BEFORE",
"DATE_AFTER",
"DATE_ON_OR_BEFORE",
"DATE_ON_OR_AFTER",
"DATE_BETWEEN",
"DATE_NOT_BETWEEN",
"DATE_IS_VALID",
"ONE_OF_RANGE",
"ONE_OF_LIST",
"BLANK",
"NOT_BLANK",
"CUSTOM_FORMULA",
"BOOLEAN"
],
"type": "string"
},
"values": {
"type": "array",
"items": {
"type": "object",
"properties": {
"relativeDate": {
"type": "string"
},
"userEnteredValue": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"gradientRule": {
"type": "object"
}
},
"additionalProperties": false
},
"index": {
"type": "integer"
}
},
"additionalProperties": false
},
"updateDimensionProperties": {
"type": "object",
"properties": {
"range": {
"type": "object",
"properties": {
"sheetId": {
"type": "integer"
},
"endIndex": {
"type": "integer"
},
"dimension": {
"enum": [
"ROWS",
"COLUMNS"
],
"type": "string"
},
"startIndex": {
"type": "integer"
}
},
"additionalProperties": false
},
"fields": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"pixelSize": {
"type": "integer"
},
"hiddenByUser": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"updateSpreadsheetProperties": {
"type": "object",
"properties": {
"fields": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"locale": {
"type": "string"
},
"timeZone": {
"type": "string"
},
"autoRecalc": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"description": "A list of Google Sheets `spreadsheets.batchUpdate` request objects. Each object must have exactly one key naming the operation.\n\nFIELDS MASK: updateCells, repeatCell, updateSheetProperties, and updateDimensionProperties take a `fields` mask listing which sub-fields to write — anything you set but don't name is silently ignored. You can OMIT `fields` and the tool auto-derives it from the data you provide (recommended). Pass an explicit `fields` only for surgical edits, or `fields: \"*\"` to overwrite every sub-field (clearing ones you didn't provide).\n\nupdateCells — write typed values and formatting to a range. Use `range` OR `start` to anchor the write. Values must be wrapped in `userEnteredValue` with an explicit type field (stringValue, numberValue, boolValue, formulaValue). `fields` is auto-derived when omitted.\n\nrepeatCell — apply one CellData to every cell in a range. Good for painting formatting, notes, or validation without enumerating rows.\n\nupdateBorders — set per-edge borders. Each side takes a Border with a style (SOLID, DASHED, DOTTED, NONE, SOLID_MEDIUM, SOLID_THICK, DOUBLE).\n\naddSheet — create a new tab. Omit sheetId to let Google assign one; read the new ID from created_resources in the reply.\n\ndeleteSheet — remove a tab permanently by sheetId.\n\nduplicateSheet — clone a tab. newSheetId is auto-assigned when omitted.\n\nupdateSheetProperties — rename, reorder, freeze rows/columns, or recolor a tab. fields is rooted at properties.\n\nupdateSpreadsheetProperties — rename the whole spreadsheet (file) or change workbook-level properties. Use this (not updateSheetProperties) to change the spreadsheet title.\n\ninsertDimension — add rows or columns. Both startIndex and endIndex are REQUIRED.\n\ndeleteDimension — remove rows or columns. Apply largest-index first within a batch to avoid index shift.\n\nmergeCells — mergeType is MERGE_ALL, MERGE_COLUMNS, or MERGE_ROWS.\n\nunmergeCells — range must not partially span an existing merge.\n\nfindReplace — scope with ONE of range, sheetId, or allSheets.\n\naddNamedRange — create a workbook-scoped named range. Server assigns namedRangeId.\n\naddProtectedRange — lock a range. warningOnly=true gives soft protection.\n\nsetDataValidation — attach a validation rule to a range. Omit rule to clear.\n\naddConditionalFormatRule — insert a conditional-format rule at given index. Use booleanRule for categorical formatting.\n\naddChart — embed a chart. Server assigns chartId in the reply.\n\nsortRange — sort rows in a range by one or more columns. sortSpecs is ordered by priority (first = primary sort key). sortOrder is ASCENDING or DESCENDING.\n\nautoResizeDimensions — resize columns or rows to fit their content. dimension is COLUMNS or ROWS.\nNOTE: the tool automatically runs all autoResizeDimensions requests in a second batchUpdate call after all other requests have been applied. This ensures the resize measures post-write cell contents, including spilling formulas (ARRAYFORMULA, SEQUENCE, MAKEARRAY, QUERY) whose spill values only exist after the first call returns. If the resize call fails (e.g. transient error), writes are unaffected and a warning is returned instead of an error. updateDimensionProperties (pixelSize) sets an explicit pixel width and does not need this treatment — it can stay in the same batch as writes.\n\nupdateDimensionProperties — set explicit pixel size or hide a row/column. fields is a mask rooted at DimensionProperties.\n"
},
"spreadsheet_id": {
"type": "string",
"description": "ID of an existing spreadsheet to edit. Omit to create a new spreadsheet."
}
}
}