Google Sheets — Tool Reference
Create and edit Google Sheets
Your AI assistant discovers and invokes these tools through the
MCP Server's meta tools —
it calls execute_tool with the tool name and arguments below.
# add_columns write
Add columns to a sheet and return the Google Sheets API update result.
Full description
Add columns to a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
count: Number of columns to add
start_column: 0-based column index to start adding. If None, adds at the end
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "count": 5} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
count | integer | Yes | Number of columns to add |
start_column | integer | null | No | 0-based column index to start adding. If None, adds at the end |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"count": {
"description": "Number of columns to add",
"title": "Count",
"type": "integer"
},
"start_column": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "0-based column index to start adding. If None, adds at the end",
"title": "Start Column"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"count"
],
"title": "AddColumnsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AddColumnsResult",
"type": "object"
} # add_conditional_format write
Add a conditional format rule from raw, preset, or simplified inputs and return the update result.
Full description
Add a conditional formatting rule to a range in a Google Spreadsheet.
Three input modes (use exactly one):
1. **rule**: Raw Google API dict (gradientRule or booleanRule)
2. **preset**: Shorthand name ('negative_red', 'positive_green', 'traffic_light')
3. **rule_type**: Simplified flat parameters (same as set_conditional_format):
- color_scale: min_color, mid_color, max_color, min_type, mid_type, max_type, etc.
- threshold: comparison, value, value2, background_color, text_color, bold
- text_contains: text, match_type, background_color, text_color, bold
- top_n: direction, count, percent, background_color, text_color, bold
- custom_formula: formula, background_color, text_color, bold, italic
Colors use hex (#RRGGBB) — converted to Google API format automatically.
IMPORTANT: Named ranges cannot be used in custom_formula conditions — this is
a Google API limitation. Use direct cell references instead.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'B2:F6')
rule: Conditional format rule (gradientRule or booleanRule)
preset: Shorthand preset name
rule_type: Simplified rule type (color_scale, threshold, etc.)
index: Rule priority index (0 = highest priority)
Returns:
Raw API response data from Google Sheets API
Example (preset): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "D2:D50", "preset": "negative_red"}
Example (rule_type): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "B2:F10", "rule_type": "color_scale", "min_color": "#FF0000", "max_color": "#00FF00"}
Example (threshold): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "C2:C100", "rule_type": "threshold", "comparison": "greater_than", "value": 1000, "background_color": "#B7E1CD"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'B2:F6') |
rule | object | null | No | Conditional format rule (use this OR preset OR rule_type). Use ONE of: gradientRule: {minpoint, midpoint, maxpoint} each with {color: {red,green,blue}, type, value} where type is MIN, MAX, NUMBER, PERCENT, PERCENTILE. booleanRule: {condition: {type, values}, format: {backgroundColor, textFormat}} where condition type is NUMBER_GREATER, NUMBER_LESS, NUMBER_BETWEEN, TEXT_CONTAINS, TEXT_NOT_CONTAINS, CUSTOM_FORMULA, etc. |
preset | string | null | No | Shorthand preset name (use this OR rule OR rule_type). Options: 'negative_red' (red text for values < 0), 'positive_green' (green text for values > 0), 'traffic_light' (red/yellow/green based on thresholds — requires thresholds param) |
thresholds | array<number> | null | No | Thresholds for traffic_light preset: [low, high]. Values below low = red, between = yellow, above high = green. |
index | integer | No | Rule priority index (0 = highest priority) Default: 0 |
rule_type | "color_scale" | "threshold" | "text_contains" | "top_n" | "custom_formula" | null | No | Simplified rule type (use this OR rule OR preset). Types: color_scale, threshold, text_contains, top_n, custom_formula |
min_color | string | null | No | Hex color for lowest values (color_scale) |
mid_color | string | null | No | Hex color for midpoint (color_scale) |
max_color | string | null | No | Hex color for highest values (color_scale) |
min_type | string | null | No | Interpolation type for min point (color_scale) |
mid_type | string | null | No | Interpolation type for mid point (color_scale) |
max_type | string | null | No | Interpolation type for max point (color_scale) |
min_value | string | integer | number | null | No | Value for min point (color_scale) |
mid_value | string | integer | number | null | No | Value for mid point (color_scale) |
max_value | string | integer | number | null | No | Value for max point (color_scale) |
text_color | string | null | No | Hex font color for matching cells |
background_color | string | null | No | Hex background color for matching cells |
match_type | string | null | No | How to match text (text_contains) |
count_percent | boolean | null | No | Treat count as percentage (top_n) |
color_preset | string | null | No | Named color preset for color_scale |
formula | string | null | No | Formula for custom_formula rule_type |
text | string | null | No | Text to match (text_contains) |
comparison | string | null | No | Comparison operator (threshold) |
value | string | integer | number | null | No | Threshold value |
value2 | string | integer | number | null | No | Upper bound for between/not_between |
bold | boolean | No | Bold matching cells Default: false |
italic | boolean | No | Italic matching cells Default: false |
direction | "top" | "bottom" | null | No | Rank direction (top_n) |
count | integer | null | No | Number of values to highlight (top_n) |
percent | boolean | No | Treat count as percentage (top_n) Default: false |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'B2:F6')",
"title": "Range",
"type": "string"
},
"rule": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Conditional format rule (use this OR preset OR rule_type). Use ONE of: gradientRule: {minpoint, midpoint, maxpoint} each with {color: {red,green,blue}, type, value} where type is MIN, MAX, NUMBER, PERCENT, PERCENTILE. booleanRule: {condition: {type, values}, format: {backgroundColor, textFormat}} where condition type is NUMBER_GREATER, NUMBER_LESS, NUMBER_BETWEEN, TEXT_CONTAINS, TEXT_NOT_CONTAINS, CUSTOM_FORMULA, etc.",
"title": "Rule"
},
"preset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Shorthand preset name (use this OR rule OR rule_type). Options: 'negative_red' (red text for values < 0), 'positive_green' (green text for values > 0), 'traffic_light' (red/yellow/green based on thresholds — requires thresholds param)",
"title": "Preset"
},
"thresholds": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Thresholds for traffic_light preset: [low, high]. Values below low = red, between = yellow, above high = green.",
"title": "Thresholds"
},
"index": {
"default": 0,
"description": "Rule priority index (0 = highest priority)",
"title": "Index",
"type": "integer"
},
"rule_type": {
"anyOf": [
{
"enum": [
"color_scale",
"threshold",
"text_contains",
"top_n",
"custom_formula"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Simplified rule type (use this OR rule OR preset). Types: color_scale, threshold, text_contains, top_n, custom_formula",
"title": "Rule Type"
},
"min_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex color for lowest values (color_scale)",
"title": "Min Color"
},
"mid_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex color for midpoint (color_scale)",
"title": "Mid Color"
},
"max_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex color for highest values (color_scale)",
"title": "Max Color"
},
"min_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Interpolation type for min point (color_scale)",
"title": "Min Type"
},
"mid_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Interpolation type for mid point (color_scale)",
"title": "Mid Type"
},
"max_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Interpolation type for max point (color_scale)",
"title": "Max Type"
},
"min_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Value for min point (color_scale)",
"title": "Min Value"
},
"mid_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Value for mid point (color_scale)",
"title": "Mid Value"
},
"max_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Value for max point (color_scale)",
"title": "Max Value"
},
"text_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex font color for matching cells",
"title": "Text Color"
},
"background_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex background color for matching cells",
"title": "Background Color"
},
"match_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to match text (text_contains)",
"title": "Match Type"
},
"count_percent": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Treat count as percentage (top_n)",
"title": "Count Percent"
},
"color_preset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Named color preset for color_scale",
"title": "Color Preset"
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Formula for custom_formula rule_type",
"title": "Formula"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Text to match (text_contains)",
"title": "Text"
},
"comparison": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Comparison operator (threshold)",
"title": "Comparison"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Threshold value",
"title": "Value"
},
"value2": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Upper bound for between/not_between",
"title": "Value2"
},
"bold": {
"default": false,
"description": "Bold matching cells",
"title": "Bold",
"type": "boolean"
},
"italic": {
"default": false,
"description": "Italic matching cells",
"title": "Italic",
"type": "boolean"
},
"direction": {
"anyOf": [
{
"enum": [
"top",
"bottom"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Rank direction (top_n)",
"title": "Direction"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of values to highlight (top_n)",
"title": "Count"
},
"percent": {
"default": false,
"description": "Treat count as percentage (top_n)",
"title": "Percent",
"type": "boolean"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range"
],
"title": "AddConditionalFormatParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AddConditionalFormatResult",
"type": "object"
} # add_filter_view write
Create a named filter view with saved filter and sort settings and return the API result.
Full description
Create a named filter view on a sheet.
Filter views let users save and switch between different filter/sort
configurations without affecting other viewers of the spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
title: Title of the filter view
range: Optional A1 notation range (defaults to full data extent)
criteria: Optional column-index-to-criteria mapping
sort_specs: Optional sort specifications
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "title": "Active Only", "criteria": {"3": {"hiddenValues": ["Inactive"]}}} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
title | string | Yes | Title of the filter view |
range | string | null | No | A1 notation range. Defaults to the sheet's full data extent if omitted. |
criteria | object | null | No | Column index (as string key) to filter criteria mapping. E.g., {'0': {'hiddenValues': ['x']}}. |
sort_specs | array<SortSpec> | null | No | Optional sort specifications for the filter view. |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"$defs": {
"SortSpec": {
"properties": {
"column": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Column letter (e.g., 'D') or 0-based column index",
"title": "Column"
},
"order": {
"default": "ASCENDING",
"description": "Sort order",
"enum": [
"ASCENDING",
"DESCENDING"
],
"title": "Order",
"type": "string"
}
},
"required": [
"column"
],
"title": "SortSpec",
"type": "object",
"additionalProperties": false
}
},
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"title": {
"description": "Title of the filter view",
"title": "Title",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A1 notation range. Defaults to the sheet's full data extent if omitted.",
"title": "Range"
},
"criteria": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Column index (as string key) to filter criteria mapping. E.g., {'0': {'hiddenValues': ['x']}}.",
"title": "Criteria"
},
"sort_specs": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/SortSpec"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional sort specifications for the filter view.",
"title": "Sort Specs"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"title"
],
"title": "AddFilterViewParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AddFilterViewResult",
"type": "object"
} # add_named_range write
Create a named range for formula-friendly references and return the Sheets API result.
Full description
Add a named range to a Google Spreadsheet.
Named ranges allow formulas to reference cells by name (e.g., =WACC_Rate)
instead of by cell address (e.g., =WACC!B32), improving readability.
Args:
spreadsheet_id: The ID of the spreadsheet
name: The name for the named range (e.g., 'WACC_Rate')
sheet: The name of the sheet
range: A1 notation range (e.g., 'A1:D10')
Returns:
The namedRangeId of the created named range
Example: {"spreadsheet_id": "abc123", "name": "WACC_Rate", "sheet": "Assumptions", "range": "B2"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
name | string | Yes | The name for the named range (e.g., 'WACC_Rate') |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'A1:D10') |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"name": {
"description": "The name for the named range (e.g., 'WACC_Rate')",
"title": "Name",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'A1:D10')",
"title": "Range",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"name",
"sheet",
"range"
],
"title": "AddNamedRangeParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"namedRangeId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the created named range",
"title": "Namedrangeid"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AddNamedRangeResult",
"type": "object"
} # add_rows write
Add rows to a sheet at a position or end and return the Google Sheets API result.
Full description
Add rows to a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
count: Number of rows to add
start_row: 0-based row index to start adding. If None, adds at the end
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "count": 10}
Example (at position): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "count": 3, "start_row": 5} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
count | integer | Yes | Number of rows to add |
start_row | integer | null | No | 0-based row index to start adding. If None, adds at the end |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"count": {
"description": "Number of rows to add",
"title": "Count",
"type": "integer"
},
"start_row": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "0-based row index to start adding. If None, adds at the end",
"title": "Start Row"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"count"
],
"title": "AddRowsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AddRowsResult",
"type": "object"
} # append_values write
Append rows of values to a range and return the Google Sheets append response.
Full description
Append values to a range.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'A1:C10')
values: 2D array of values to append
value_input_option: How to interpret the input data
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:C1", "values": [["Charlie", 35, "Chicago"]]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'A1:C10') |
values | array<array<object>> | Yes | 2D array of values to append |
value_input_option | string | null | No | How to interpret the input data Default: "USER_ENTERED" |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'A1:C10')",
"title": "Range",
"type": "string"
},
"values": {
"description": "2D array of values to append",
"items": {
"items": {},
"type": "array"
},
"title": "Values",
"type": "array"
},
"value_input_option": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "USER_ENTERED",
"description": "How to interpret the input data",
"title": "Value Input Option"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"values"
],
"title": "AppendValuesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AppendValuesResult",
"type": "object"
} # auto_resize_columns write
Auto-resize columns to content using font metrics for accurate widths and return applied sizing info.
Full description
Auto-resize columns to fit their content using font metrics.
Reads cell values and formatting, measures text width using HarfBuzz
(the same shaping engine Chrome/Google Sheets uses), and sets each
column width to fit its widest cell content.
This produces more accurate results than Google's built-in
autoResizeDimensions API, which often underestimates widths for bold
text and non-default fonts.
IMPORTANT: Merged cells can inflate column widths. When a merged title
cell spans multiple columns, the full content width is attributed to
individual columns, causing excessive widths. Workarounds:
- Use max_width_px to cap column width
- Auto-resize BEFORE merging title cells
- Or: auto-resize, then manually set column widths back after merging
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
columns: Column specification (e.g., 'A', 'A:C', 'A,C,E', '1', '1:3', '1,3,5')
min_width_px: Optional minimum column width in pixels
max_width_px: Optional maximum column width in pixels
padding: Extra padding in pixels (default 16 — accounts for cell padding)
Returns:
Success status and column width details
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "columns": "A:G", "min_width_px": 60, "max_width_px": 300} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
columns | string | Yes | Column specification (e.g., 'A', 'A:C', 'A,C,E', '1', '1:3', '1,3,5') |
min_width_px | integer | null | No | Minimum column width in pixels. Columns narrower than this after auto-resize will be widened. |
max_width_px | integer | null | No | Maximum column width in pixels (default 250). Columns wider than this after auto-resize will be narrowed. Set to null for unlimited. Default: 250 |
padding | integer | null | No | Extra padding in pixels added to the measured text width (default 16 — accounts for cell padding). Default: 16 |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"columns": {
"description": "Column specification (e.g., 'A', 'A:C', 'A,C,E', '1', '1:3', '1,3,5')",
"title": "Columns",
"type": "string"
},
"min_width_px": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum column width in pixels. Columns narrower than this after auto-resize will be widened.",
"title": "Min Width Px"
},
"max_width_px": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": 250,
"description": "Maximum column width in pixels (default 250). Columns wider than this after auto-resize will be narrowed. Set to null for unlimited.",
"title": "Max Width Px"
},
"padding": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": 16,
"description": "Extra padding in pixels added to the measured text width (default 16 — accounts for cell padding).",
"title": "Padding"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"columns"
],
"title": "AutoResizeColumnsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "AutoResizeColumnsResult",
"type": "object"
} # batch_add_conditional_format write
Add multiple conditional formatting rules in one API call and return the batch update result.
Full description
Add multiple conditional formatting rules in a single API call.
Each rule specifies its own sheet, range, and formatting. All rules are
sent together in one batchUpdate request.
Args:
spreadsheet_id: The ID of the spreadsheet
rules: List of rules. Each dict has: sheet, range, rule, and optional index
Returns:
Number of rules added
Example: {"spreadsheet_id": "abc123", "rules": [{"sheet": "Sheet1", "range": "D2:D50", "rule": {"booleanRule": {"condition": {"type": "NUMBER_LESS", "values": [{"userEnteredValue": "0"}]}, "format": {"textFormat": {"foregroundColor": {"red": 0.8, "green": 0, "blue": 0}}}}}}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
rules | array<object> | Yes | List of conditional format rules. Each dict has: 'sheet' (sheet name), 'range' (A1 notation), 'rule' (gradientRule or booleanRule dict), and optional 'index' (priority, default 0). Example: [{'sheet': 'Sheet1', 'range': 'D2:D50', 'rule': {'booleanRule': {...}}}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"rules": {
"description": "List of conditional format rules. Each dict has: 'sheet' (sheet name), 'range' (A1 notation), 'rule' (gradientRule or booleanRule dict), and optional 'index' (priority, default 0). Example: [{'sheet': 'Sheet1', 'range': 'D2:D50', 'rule': {'booleanRule': {...}}}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Rules",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"rules"
],
"title": "BatchAddConditionalFormatParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"rulesAdded": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of rules added",
"title": "Rulesadded"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchAddConditionalFormatResult",
"type": "object"
} # batch_add_named_range write
Create multiple named ranges in one API call and return the batch update result.
Full description
Create multiple named ranges in a single API call.
Each entry specifies a name, sheet, and range. All are created together
in one batchUpdate request.
Args:
spreadsheet_id: The ID of the spreadsheet
ranges: List of named ranges. Each dict has: name, sheet, range
Returns:
Number of ranges created and their IDs
Example: {"spreadsheet_id": "abc123", "ranges": [{"name": "growth_rate", "sheet": "Assumptions", "range": "B2"}, {"name": "tax_rate", "sheet": "Assumptions", "range": "B3"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
ranges | array<object> | Yes | List of named ranges to create. Each dict has: 'name' (range name), 'sheet' (sheet name), 'range' (A1 notation). Example: [{'name': 'growth_rate', 'sheet': 'Assumptions', 'range': 'B2'}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"ranges": {
"description": "List of named ranges to create. Each dict has: 'name' (range name), 'sheet' (sheet name), 'range' (A1 notation). Example: [{'name': 'growth_rate', 'sheet': 'Assumptions', 'range': 'B2'}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Ranges",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"ranges"
],
"title": "BatchAddNamedRangeParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"rangesAdded": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of named ranges created",
"title": "Rangesadded"
},
"namedRangeIds": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "IDs of the created named ranges",
"title": "Namedrangeids"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchAddNamedRangeResult",
"type": "object"
} # batch_create_chart write
Create multiple embedded charts in one API call and return the batch chart creation result.
Full description
Create multiple charts in a single API call.
Accepts an array of chart specs (same fields as create_chart) and
creates them all in one batchUpdate request.
Args:
spreadsheet_id: The ID of the spreadsheet
charts: Array of chart specs with sheet, sourceRange, chartType, etc.
Returns:
List of created chart IDs
Example: {"spreadsheet_id": "abc123", "charts": [{"sheet": "Sheet1", "sourceRange": "A1:D10", "chartType": "column", "title": "Revenue"}, {"sheet": "Sheet1", "sourceRange": "A1:B10", "chartType": "pie", "title": "Market Share", "anchorCell": "F15"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
charts | array<object> | Yes | Array of chart specs. Each has the same fields as create_chart: sheet, sourceRange, chartType, title?, xAxisTitle?, yAxisTitle?, legendPosition?, headerRow?, headerColumn?, anchorCell?, width?, height?, seriesColors?, seriesTypes?, stacked?, dataOrientation? |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"charts": {
"description": "Array of chart specs. Each has the same fields as create_chart: sheet, sourceRange, chartType, title?, xAxisTitle?, yAxisTitle?, legendPosition?, headerRow?, headerColumn?, anchorCell?, width?, height?, seriesColors?, seriesTypes?, stacked?, dataOrientation?",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Charts",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"charts"
],
"title": "BatchCreateChartParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"chartIds": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "IDs of the created charts",
"title": "Chartids"
},
"chartsCreated": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of charts created",
"title": "Chartscreated"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchCreateChartResult",
"type": "object"
} # batch_format_cells write
Format multiple noncontiguous ranges in one API call and return the batch update result.
Full description
Apply formatting to multiple non-contiguous ranges in a single API call.
Each entry in the formats list specifies a range (A1 notation) and a
format_data object (Google Sheets CellFormat). All format operations are
sent together in one batchUpdate request, which is much more efficient
than calling format_cells repeatedly.
Supports cross-sheet formatting: set a default 'sheet' at the top level,
and/or override per entry with a 'sheet' key. At least one must be provided.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: Default sheet name (optional if every entry has its own 'sheet')
formats: List of format operations. Each dict must have:
- range: A1 notation range (e.g., 'A7:G7')
- format_data: Google Sheets CellFormat object with keys like
textFormat, backgroundColor, numberFormat, horizontalAlignment, etc.
- sheet: (optional) Override the default sheet for this entry
Examples:
Bold headers + percent format on data:
[
{"range": "A1:G1", "format_data": {"textFormat": {"bold": true}, "backgroundColor": {"red": 0.9, "green": 0.9, "blue": 0.9}}},
{"range": "B2:F10", "format_data": {"numberFormat": {"type": "PERCENT", "pattern": "0.0%"}}}
]
Cross-sheet formatting:
[
{"range": "A1:N1", "format_data": {"textFormat": {"bold": true}}},
{"sheet": "Balance Sheet", "range": "A1:F1", "format_data": {"textFormat": {"bold": true}}}
]
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "formats": [{"range": "A1:G1", "format_data": {"textFormat": {"bold": true}}}, {"range": "B2:G10", "format_data": {"numberFormat": {"type": "PERCENT", "pattern": "0.0%"}}}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | null | No | Default sheet name. Can be overridden per entry. |
formats | array<object> | Yes | List of format operations. Each dict has 'range' (A1 notation like 'A7:G7') and 'format_data' (Google Sheets CellFormat object). Optionally include 'sheet' per entry to override the default sheet. Example: [{'range': 'A7:G7', 'format_data': {'textFormat': {'bold': true}}}, {'sheet': 'Balance Sheet', 'range': 'A1:F1', 'format_data': {'textFormat': {'bold': true}}}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Default sheet name. Can be overridden per entry.",
"title": "Sheet"
},
"formats": {
"description": "List of format operations. Each dict has 'range' (A1 notation like 'A7:G7') and 'format_data' (Google Sheets CellFormat object). Optionally include 'sheet' per entry to override the default sheet. Example: [{'range': 'A7:G7', 'format_data': {'textFormat': {'bold': true}}}, {'sheet': 'Balance Sheet', 'range': 'A1:F1', 'format_data': {'textFormat': {'bold': true}}}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Formats",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"formats"
],
"title": "BatchFormatCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if the operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchFormatCellsResult",
"type": "object"
} # batch_freeze_panes write
Freeze rows or columns across multiple sheets in one API call and return the batch result.
Full description
Freeze rows and/or columns across multiple sheets in a single API call.
Each entry specifies a sheet and the number of frozen rows/columns.
All operations are batched for efficiency.
Args:
spreadsheet_id: The ID of the spreadsheet
panes: List of freeze operations with sheet, frozenRows (default 0),
frozenColumns (default 0)
Returns:
Number of sheets updated
Example: {"spreadsheet_id": "abc123", "panes": [{"sheet": "P&L", "frozenRows": 2, "frozenColumns": 1}, {"sheet": "Dashboard", "frozenRows": 1}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
panes | array<object> | Yes | List of freeze operations. Each dict has: 'sheet' (sheet name), 'frozenRows' (int, default 0), 'frozenColumns' (int, default 0). Example: [{'sheet': 'P&L', 'frozenRows': 2, 'frozenColumns': 1}, {'sheet': 'Dashboard', 'frozenRows': 1}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"panes": {
"description": "List of freeze operations. Each dict has: 'sheet' (sheet name), 'frozenRows' (int, default 0), 'frozenColumns' (int, default 0). Example: [{'sheet': 'P&L', 'frozenRows': 2, 'frozenColumns': 1}, {'sheet': 'Dashboard', 'frozenRows': 1}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Panes",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"panes"
],
"title": "BatchFreezePanesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"sheetsUpdated": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of sheets with freeze applied",
"title": "Sheetsupdated"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if the operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchFreezePanesResult",
"type": "object"
} # batch_merge_cells write
Merge multiple ranges in one API call and return the batch merge update result.
Full description
Merge multiple ranges in a single API call.
Each entry in the merges list specifies a range (A1 notation) and an optional
mergeType. All merge operations are sent together in one batchUpdate request,
which is much more efficient than calling merge_cells repeatedly.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
merges: List of merge operations. Each dict must have:
- range: A1 notation range (e.g., 'A1:H1')
- mergeType: Optional, one of MERGE_ALL (default), MERGE_COLUMNS, MERGE_ROWS
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "merges": [{"range": "A1:H1"}, {"range": "A5:H5", "mergeType": "MERGE_ALL"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
merges | array<object> | Yes | List of merge operations. Each dict has 'range' (A1 notation like 'A1:H1') and optional 'mergeType' (MERGE_ALL, MERGE_COLUMNS, or MERGE_ROWS; defaults to MERGE_ALL). Example: [{'range': 'A1:H1'}, {'range': 'A5:H5', 'mergeType': 'MERGE_ALL'}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"merges": {
"description": "List of merge operations. Each dict has 'range' (A1 notation like 'A1:H1') and optional 'mergeType' (MERGE_ALL, MERGE_COLUMNS, or MERGE_ROWS; defaults to MERGE_ALL). Example: [{'range': 'A1:H1'}, {'range': 'A5:H5', 'mergeType': 'MERGE_ALL'}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Merges",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"merges"
],
"title": "BatchMergeCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchMergeCellsResult",
"type": "object"
} # batch_set_column_width write
Set column widths across multiple sheets in one API call and return the batch update result.
Full description
Set column widths across multiple sheets in a single API call.
Each entry specifies a sheet, column range, and width. All operations
are batched into one request for efficiency.
Args:
spreadsheet_id: The ID of the spreadsheet
widths: List of column width operations with sheet, startColumn (1-based),
optional endColumn (1-based exclusive), and widthPixels
Returns:
Number of column width operations applied
Example: {"spreadsheet_id": "abc123", "widths": [{"sheet": "P&L", "startColumn": 1, "widthPixels": 200}, {"sheet": "Balance Sheet", "startColumn": 1, "widthPixels": 250}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
widths | array<object> | Yes | List of column width operations. Each dict has: 'sheet' (sheet name), 'startColumn' (1-based), 'endColumn' (1-based exclusive, optional — omit for single column), 'widthPixels' (int). Example: [{'sheet': 'P&L', 'startColumn': 1, 'endColumn': 1, 'widthPixels': 200}, {'sheet': 'Balance Sheet', 'startColumn': 1, 'endColumn': 1, 'widthPixels': 250}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"widths": {
"description": "List of column width operations. Each dict has: 'sheet' (sheet name), 'startColumn' (1-based), 'endColumn' (1-based exclusive, optional — omit for single column), 'widthPixels' (int). Example: [{'sheet': 'P&L', 'startColumn': 1, 'endColumn': 1, 'widthPixels': 200}, {'sheet': 'Balance Sheet', 'startColumn': 1, 'endColumn': 1, 'widthPixels': 250}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Widths",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"widths"
],
"title": "BatchSetColumnWidthParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"columnsUpdated": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of column width operations applied",
"title": "Columnsupdated"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if the operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchSetColumnWidthResult",
"type": "object"
} # batch_set_data_validation write
Set data validation on multiple ranges in one API call and return the batch result.
Full description
Set data validation on multiple ranges in a single API call.
Each entry specifies its own sheet, range, and validation rule. All
validations are sent together in one batchUpdate request.
Args:
spreadsheet_id: The ID of the spreadsheet
validations: List of validations. Each dict has: sheet, range, rule
Returns:
Number of validations applied
Example: {"spreadsheet_id": "abc123", "validations": [{"sheet": "Sheet1", "range": "C2:C50", "rule": {"type": "dropdown", "values": ["Yes", "No"]}}, {"sheet": "Sheet1", "range": "D2:D50", "rule": {"type": "number_between", "min": 0, "max": 100}}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
validations | array<object> | Yes | List of data validation rules. Each dict has: 'sheet' (sheet name), 'range' (A1 notation), 'rule' (validation rule dict). Example: [{'sheet': 'Sheet1', 'range': 'D2:D50', 'rule': {'condition': {'type': 'ONE_OF_LIST', 'values': [{'userEnteredValue': 'Yes'}, {'userEnteredValue': 'No'}]}, 'showCustomUi': true}}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"validations": {
"description": "List of data validation rules. Each dict has: 'sheet' (sheet name), 'range' (A1 notation), 'rule' (validation rule dict). Example: [{'sheet': 'Sheet1', 'range': 'D2:D50', 'rule': {'condition': {'type': 'ONE_OF_LIST', 'values': [{'userEnteredValue': 'Yes'}, {'userEnteredValue': 'No'}]}, 'showCustomUi': true}}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Validations",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"validations"
],
"title": "BatchSetDataValidationParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"validationsSet": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of validations applied",
"title": "Validationsset"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchSetDataValidationResult",
"type": "object"
} # batch_set_row_height write
Set row heights across multiple sheets in one API call and return the batch update result.
Full description
Set row heights across multiple sheets in a single API call.
Each entry specifies a sheet, row range, and height. All operations
are batched into one request for efficiency.
Args:
spreadsheet_id: The ID of the spreadsheet
heights: List of row height operations with sheet, startRow (1-based),
optional endRow (1-based exclusive), and heightPixels
Returns:
Number of row height operations applied
Example: {"spreadsheet_id": "abc123", "heights": [{"sheet": "Sheet1", "startRow": 1, "heightPixels": 50}, {"sheet": "Sheet1", "startRow": 5, "endRow": 10, "heightPixels": 30}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
heights | array<object> | Yes | List of row height operations. Each dict has: 'sheet' (sheet name), 'startRow' (1-based), 'endRow' (1-based exclusive, optional — omit for single row), 'heightPixels' (int). Example: [{'sheet': 'Invoice', 'startRow': 1, 'endRow': 1, 'heightPixels': 50}, {'sheet': 'Invoice', 'startRow': 5, 'endRow': 10, 'heightPixels': 30}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"heights": {
"description": "List of row height operations. Each dict has: 'sheet' (sheet name), 'startRow' (1-based), 'endRow' (1-based exclusive, optional — omit for single row), 'heightPixels' (int). Example: [{'sheet': 'Invoice', 'startRow': 1, 'endRow': 1, 'heightPixels': 50}, {'sheet': 'Invoice', 'startRow': 5, 'endRow': 10, 'heightPixels': 30}]",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Heights",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"heights"
],
"title": "BatchSetRowHeightParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"rowsUpdated": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of row height operations applied",
"title": "Rowsupdated"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if the operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchSetRowHeightResult",
"type": "object"
} # batch_set_tab_color write
Set tab colors for multiple sheets in one API call and return how many were updated.
Full description
Set tab colors for multiple sheets in a single API call.
Args:
spreadsheet_id: The ID of the spreadsheet
colors: List of {sheet, tabColor} pairs
Returns:
Number of tab colors set
Example: {"spreadsheet_id": "abc123", "colors": [{"sheet": "Dashboard", "tabColor": "#0F9D58"}, {"sheet": "P&L", "tabColor": "#4285F4"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
colors | array<object> | Yes | List of tab color operations. Each dict has: 'sheet' (sheet name), 'tabColor' (hex string #RRGGBB). Example: [{'sheet': 'Dashboard', 'tabColor': '#0F9D58'}, {'sheet': 'P&L', 'tabColor': '#4285F4'}] |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"colors": {
"description": "List of tab color operations. Each dict has: 'sheet' (sheet name), 'tabColor' (hex string #RRGGBB). Example: [{'sheet': 'Dashboard', 'tabColor': '#0F9D58'}, {'sheet': 'P&L', 'tabColor': '#4285F4'}]",
"items": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"title": "Colors",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"colors"
],
"title": "BatchSetTabColorParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"sheetsUpdated": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of tab colors set",
"title": "Sheetsupdated"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if the operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchSetTabColorResult",
"type": "object"
} # batch_sheet_operations write
Execute mixed value, format, and merge operations in order in one API call and return the batch result.
Full description
Execute mixed operations (writes, formatting, merges, etc.) in a single API call.
Combines what would normally require separate batch_update_cells, batch_format_cells,
and batch_merge_cells calls into one request. Operations execute in order.
Supported operation types:
- update_values: {range: "A1:C3", values: [["a","b","c"]]}
- format: {range: "A1:H1", format_data: {textFormat: {bold: true}, backgroundColor: {...}}}
- merge: {range: "A1:H1", mergeType?: "MERGE_ALL"}
- set_row_height: {startRow: 1, endRow?: 3, heightPixels: 40}
- add_banding: {range: "A1:G20", headerColor?: "#4285F4", firstBandColor?: "#FFF", secondBandColor?: "#F3F3F3"}
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: Default sheet name for operations
operations: List of mixed operations
Returns:
Number of operations executed
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "operations": [{"type": "update_values", "range": "A1:C1", "values": [["Name", "Qty", "Price"]]}, {"type": "format", "range": "A1:C1", "format_data": {"textFormat": {"bold": true}}}, {"type": "merge", "range": "A5:C5"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | Default sheet name for operations |
operations | array<object> | Yes | List of mixed operations. Each dict has 'type' and type-specific fields. Types: 'update_values' ({range, values}), 'format' ({range, format_data}), 'merge' ({range, mergeType?}), 'set_row_height' ({startRow, endRow?, heightPixels}), 'add_banding' ({range, headerColor?, firstBandColor?, secondBandColor?}), 'set_column_width' ({startColumn, endColumn?, widthPixels}), 'conditional_format' ({range, rule, index?}), 'rename_sheet' ({newName}). All sent in a single API call. |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "Default sheet name for operations",
"title": "Sheet",
"type": "string"
},
"operations": {
"description": "List of mixed operations. Each dict has 'type' and type-specific fields. Types: 'update_values' ({range, values}), 'format' ({range, format_data}), 'merge' ({range, mergeType?}), 'set_row_height' ({startRow, endRow?, heightPixels}), 'add_banding' ({range, headerColor?, firstBandColor?, secondBandColor?}), 'set_column_width' ({startColumn, endColumn?, widthPixels}), 'conditional_format' ({range, rule, index?}), 'rename_sheet' ({newName}). All sent in a single API call.",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Operations",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"operations"
],
"title": "BatchSheetOperationsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"operationsExecuted": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of operations executed",
"title": "Operationsexecuted"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchSheetOperationsResult",
"type": "object"
} # batch_update_cells write
Update multiple ranges in one sheet in one API call and return the batch update result.
Full description
Batch update multiple ranges in a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
ranges: Dictionary mapping range strings to 2D arrays of values
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "ranges": {"A1:B1": [["Name", "Score"]], "D1:D1": [["Total"]]}} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
ranges | object | Yes | Dictionary mapping range strings to 2D arrays of values |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"ranges": {
"additionalProperties": {
"items": {
"items": {},
"type": "array"
},
"type": "array"
},
"description": "Dictionary mapping range strings to 2D arrays of values",
"title": "Ranges",
"type": "object"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"ranges"
],
"title": "BatchUpdateCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchUpdateCellsResult",
"type": "object"
} # batch_update_values write
Update multiple ranges, optionally across sheets, in one API call and return the batch values result.
Full description
Batch update multiple ranges in a single API call.
The 'sheet' parameter sets a default sheet for all entries. Each entry
can override with its own sheet by using 'Sheet2!A1:B5' notation in
the range, or by omitting the top-level sheet and using sheet-prefixed
ranges for every entry.
Ranges are auto-expanded to fit provided data — if you provide 22 rows
but the range only covers 21, the range end is adjusted automatically.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: Default sheet name for entries without a sheet prefix in range.
Optional if every entry's range includes a sheet prefix (e.g., 'Sheet1!A1:B5').
updates: List of {range, values} objects. Each range is A1 notation.
Use sheet prefix to target different sheets: 'Sheet2!A1:B5'.
value_input_option: How to interpret the input data (USER_ENTERED or RAW)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "updates": [{"range": "A1:B2", "values": [["Name", "Score"], ["Alice", 95]]}, {"range": "D1:D2", "values": [["Total"], ["=SUM(B:B)"]]}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | null | No | Default sheet name. Optional if all ranges include sheet prefix (e.g., 'P&L!A1:N22'). |
updates | array<object> | Yes | List of update objects with range and values. Range can include sheet prefix for cross-sheet updates (e.g., 'P&L!A1:N22'). |
value_input_option | string | null | No | How to interpret the input data Default: "USER_ENTERED" |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Default sheet name. Optional if all ranges include sheet prefix (e.g., 'P&L!A1:N22').",
"title": "Sheet"
},
"updates": {
"description": "List of update objects with range and values. Range can include sheet prefix for cross-sheet updates (e.g., 'P&L!A1:N22').",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Updates",
"type": "array"
},
"value_input_option": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "USER_ENTERED",
"description": "How to interpret the input data",
"title": "Value Input Option"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"updates"
],
"title": "BatchUpdateValuesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"formulaResults": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Computed values for formula cells: [{range, values}]",
"title": "Formularesults"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "BatchUpdateValuesResult",
"type": "object"
} # check_spreadsheet_errors read
Check a Google Spreadsheet for formula errors, broken references, and other data issues.
Full description
Check a spreadsheet for all types of errors.
Scans the specified sheets (or all sheets) for formula errors like #DIV/0!, #REF!, #VALUE!, etc.
Provides detailed information about each error including location, type, and context.
Args:
spreadsheet_id: The ID of the spreadsheet to check
sheet_names: Optional list of specific sheet names to check (default: all sheets)
include_context: Whether to include surrounding cell values for context
include_warnings: Whether to include warnings for potential issues
Returns:
Summary and detailed list of all errors found in the spreadsheet
Example: {"spreadsheet_id": "abc123"}
Example (specific sheets): {"spreadsheet_id": "abc123", "sheet_names": ["P&L", "Balance Sheet"], "detect_circular_refs": true} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet to check for errors |
sheet_names | array<string> | null | No | Specific sheets to check (default: all sheets) |
include_context | boolean | No | Include surrounding cell values for context Default: true |
include_warnings | boolean | No | Include warnings for potential issues Default: false |
detect_circular_refs | boolean | No | Check for circular references (formulas referencing themselves) Default: false |
detect_pattern_inconsistencies | boolean | No | Check for formula pattern breaks across rows/columns Default: false |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet to check for errors",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet_names": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Specific sheets to check (default: all sheets)",
"title": "Sheet Names"
},
"include_context": {
"default": true,
"description": "Include surrounding cell values for context",
"title": "Include Context",
"type": "boolean"
},
"include_warnings": {
"default": false,
"description": "Include warnings for potential issues",
"title": "Include Warnings",
"type": "boolean"
},
"detect_circular_refs": {
"default": false,
"description": "Check for circular references (formulas referencing themselves)",
"title": "Detect Circular Refs",
"type": "boolean"
},
"detect_pattern_inconsistencies": {
"default": false,
"description": "Check for formula pattern breaks across rows/columns",
"title": "Detect Pattern Inconsistencies",
"type": "boolean"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "CheckErrorsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"ErrorContext": {
"properties": {
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The formula causing the error",
"title": "Formula"
},
"referenced_cells": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Values of cells referenced in the formula",
"title": "Referenced Cells"
}
},
"title": "ErrorContext",
"type": "object"
},
"ErrorDetail": {
"properties": {
"location": {
"$ref": "#/$defs/ErrorLocation",
"description": "Location of the error"
},
"error_type": {
"description": "Type of error (e.g., '#DIV/0!')",
"title": "Error Type",
"type": "string"
},
"error_message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Detailed error message",
"title": "Error Message"
},
"context": {
"anyOf": [
{
"$ref": "#/$defs/ErrorContext"
},
{
"type": "null"
}
],
"default": null,
"description": "Additional context about the error"
},
"severity": {
"default": "error",
"description": "Severity level: 'error' or 'warning'",
"title": "Severity",
"type": "string"
},
"suggestion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Suggestion for fixing the error",
"title": "Suggestion"
}
},
"required": [
"location",
"error_type"
],
"title": "ErrorDetail",
"type": "object"
},
"ErrorLocation": {
"properties": {
"sheet": {
"description": "Sheet name",
"title": "Sheet",
"type": "string"
},
"cell": {
"description": "Cell reference (e.g., 'A1')",
"title": "Cell",
"type": "string"
},
"row": {
"description": "Row number (1-indexed)",
"title": "Row",
"type": "integer"
},
"column": {
"description": "Column number (1-indexed)",
"title": "Column",
"type": "integer"
}
},
"required": [
"sheet",
"cell",
"row",
"column"
],
"title": "ErrorLocation",
"type": "object"
},
"ErrorSummary": {
"properties": {
"total_errors": {
"description": "Total number of errors found",
"title": "Total Errors",
"type": "integer"
},
"total_warnings": {
"default": 0,
"description": "Total number of warnings found",
"title": "Total Warnings",
"type": "integer"
},
"error_counts": {
"additionalProperties": {
"type": "integer"
},
"description": "Count of each error type",
"title": "Error Counts",
"type": "object"
},
"sheets_affected": {
"description": "List of sheets with errors",
"items": {
"type": "string"
},
"title": "Sheets Affected",
"type": "array"
}
},
"required": [
"total_errors",
"error_counts",
"sheets_affected"
],
"title": "ErrorSummary",
"type": "object"
}
},
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"summary": {
"anyOf": [
{
"$ref": "#/$defs/ErrorSummary"
},
{
"type": "null"
}
],
"default": null,
"description": "Summary of all errors found"
},
"errors": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ErrorDetail"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of all errors found",
"title": "Errors"
},
"warnings": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ErrorDetail"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of potential issues",
"title": "Warnings"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "CheckErrorsResult",
"type": "object"
} # clear_values write
Clear values from a sheet or range while leaving formatting intact and return the API result.
Full description
Clear values in a range.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: Optional A1 notation range (e.g., 'A1:C10')
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:C10"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | null | No | Optional A1 notation range (e.g., 'A1:C10') |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional A1 notation range (e.g., 'A1:C10')",
"title": "Range"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "ClearValuesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ClearValuesResult",
"type": "object"
} # copy_sheet write
Copy a sheet from one spreadsheet to another and return the Google Sheets API result.
Full description
Copy a sheet from one spreadsheet to another.
Args:
source_spreadsheet_id: Source spreadsheet ID
source_sheet: Source sheet name
destination_spreadsheet_id: Destination spreadsheet ID
destination_sheet: Destination sheet name
Returns:
Raw API response data from Google Sheets API
Example: {"source_spreadsheet_id": "abc123", "source_sheet": "Template", "destination_spreadsheet_id": "def456", "destination_sheet": "Q2 Report"} | Parameter | Type | Required | Description |
|---|---|---|---|
source_spreadsheet_id | string | Yes | Source spreadsheet ID |
source_sheet | string | Yes | Source sheet name |
destination_spreadsheet_id | string | Yes | Destination spreadsheet ID |
destination_sheet | string | Yes | Destination sheet name |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"source_spreadsheet_id": {
"description": "Source spreadsheet ID",
"title": "Source Spreadsheet Id",
"type": "string"
},
"source_sheet": {
"description": "Source sheet name",
"title": "Source Sheet",
"type": "string"
},
"destination_spreadsheet_id": {
"description": "Destination spreadsheet ID",
"title": "Destination Spreadsheet Id",
"type": "string"
},
"destination_sheet": {
"description": "Destination sheet name",
"title": "Destination Sheet",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"source_spreadsheet_id",
"source_sheet",
"destination_spreadsheet_id",
"destination_sheet"
],
"title": "CopySheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "CopySheetResult",
"type": "object"
} # create_chart write
Create an embedded chart from a data range and return the chart creation update result.
Full description
Create a chart on a Google Spreadsheet from a data range.
Supports column, bar, line, area, pie, scatter, combo, and stacked variants.
The chart is embedded as an overlay on the specified sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: Sheet where the chart is placed
source_range: Data range in A1 notation (e.g., 'A41:G42')
chart_type: Type of chart (column, bar, line, area, pie, scatter, combo, stacked_column, stacked_bar, stacked_area)
title: Optional chart title
x_axis_title: Optional X-axis label
y_axis_title: Optional Y-axis label
legend_position: Legend position (bottom, top, right, left, none)
header_row: Whether first row is headers. In columns mode: series names.
In rows mode: domain/category labels (x-axis values) — this row is NOT
plotted as a series, so your data range should include it as an extra row.
header_column: Whether first column is labels. In columns mode: domain/category
labels (x-axis). In rows mode: series names — this column is NOT plotted
as data values.
anchor_cell: Cell for top-left of chart (e.g., 'H2')
width: Width in pixels (default 600)
height: Height in pixels (default 371)
series_colors: Hex colors per series (e.g., ['#4285F4'])
series_types: Per-series chart type for combo charts. Provide one type per data
series, e.g., ['column', 'column', 'line']. Values: column, bar, line, area, scatter.
Required when chart_type='combo'.
stacked: Stack series for column/bar/area types
data_orientation: How data series are laid out. 'columns' (default): each column
after the first is a series. 'rows': each row after the first is a series —
use this for financial models where quarters are columns and line items are rows.
Returns:
The chartId of the created chart
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "source_range": "A1:D10", "chart_type": "column", "title": "Quarterly Revenue", "anchor_cell": "F2"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet where the chart is placed |
source_range | string | Yes | Data range in A1 notation (e.g., 'A41:G42') |
chart_type | "column" | "bar" | "line" | "area" | "pie" | "scatter" | "combo" | "stacked_column" | "stacked_bar" | "stacked_area" | Yes | Type of chart to create |
title | string | null | No | Chart title |
x_axis_title | string | null | No | X-axis label |
y_axis_title | string | null | No | Y-axis label |
legend_position | "bottom" | "top" | "right" | "left" | "none" | null | No | Legend position Default: "bottom" |
header_row | boolean | No | First row contains series headers Default: true |
header_column | boolean | No | First column contains category labels Default: true |
anchor_cell | string | null | No | Cell for top-left of chart (e.g., 'H2') |
width | integer | No | Width in pixels Default: 600 |
height | integer | No | Height in pixels Default: 371 |
series_colors | array<string> | null | No | Hex colors per series (e.g., ['#4285F4', '#EA4335']) |
series_types | array<"column" | "bar" | "line" | "area" | "scatter"> | null | No | Per-series chart type for combo charts (e.g., ['column', 'column', 'line']). Required for combo chart_type. |
stacked | boolean | No | Stack series (for column/bar/area types) Default: false |
data_orientation | "columns" | "rows" | null | No | How to interpret data series. 'columns' (default): each column is a series. 'rows': each row is a series — use for financial models where quarters are columns. |
y_axis_min | number | null | No | Minimum value for the Y-axis (left axis). Auto-scaled if omitted. |
y_axis_max | number | null | No | Maximum value for the Y-axis (left axis). Auto-scaled if omitted. |
domain_range | string | null | No | A1 range for domain/x-axis labels (e.g., 'A1:A10'). Required when using series_ranges; omitting it uses the domain from source_range. |
series_ranges | array<string> | null | No | List of A1 ranges, one per data series (e.g., ['C1:C10', 'E1:E10']). Use for non-contiguous columns. |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet where the chart is placed",
"title": "Sheet",
"type": "string"
},
"source_range": {
"description": "Data range in A1 notation (e.g., 'A41:G42')",
"title": "Source Range",
"type": "string"
},
"chart_type": {
"description": "Type of chart to create",
"enum": [
"column",
"bar",
"line",
"area",
"pie",
"scatter",
"combo",
"stacked_column",
"stacked_bar",
"stacked_area"
],
"title": "Chart Type",
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Chart title",
"title": "Title"
},
"x_axis_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "X-axis label",
"title": "X Axis Title"
},
"y_axis_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Y-axis label",
"title": "Y Axis Title"
},
"legend_position": {
"anyOf": [
{
"enum": [
"bottom",
"top",
"right",
"left",
"none"
],
"type": "string"
},
{
"type": "null"
}
],
"default": "bottom",
"description": "Legend position",
"title": "Legend Position"
},
"header_row": {
"default": true,
"description": "First row contains series headers",
"title": "Header Row",
"type": "boolean"
},
"header_column": {
"default": true,
"description": "First column contains category labels",
"title": "Header Column",
"type": "boolean"
},
"anchor_cell": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Cell for top-left of chart (e.g., 'H2')",
"title": "Anchor Cell"
},
"width": {
"default": 600,
"description": "Width in pixels",
"title": "Width",
"type": "integer"
},
"height": {
"default": 371,
"description": "Height in pixels",
"title": "Height",
"type": "integer"
},
"series_colors": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex colors per series (e.g., ['#4285F4', '#EA4335'])",
"title": "Series Colors"
},
"series_types": {
"anyOf": [
{
"items": {
"enum": [
"column",
"bar",
"line",
"area",
"scatter"
],
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Per-series chart type for combo charts (e.g., ['column', 'column', 'line']). Required for combo chart_type.",
"title": "Series Types"
},
"stacked": {
"default": false,
"description": "Stack series (for column/bar/area types)",
"title": "Stacked",
"type": "boolean"
},
"data_orientation": {
"anyOf": [
{
"enum": [
"columns",
"rows"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to interpret data series. 'columns' (default): each column is a series. 'rows': each row is a series — use for financial models where quarters are columns.",
"title": "Data Orientation"
},
"y_axis_min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the Y-axis (left axis). Auto-scaled if omitted.",
"title": "Y Axis Min"
},
"y_axis_max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the Y-axis (left axis). Auto-scaled if omitted.",
"title": "Y Axis Max"
},
"domain_range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A1 range for domain/x-axis labels (e.g., 'A1:A10'). Required when using series_ranges; omitting it uses the domain from source_range.",
"title": "Domain Range"
},
"series_ranges": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of A1 ranges, one per data series (e.g., ['C1:C10', 'E1:E10']). Use for non-contiguous columns.",
"title": "Series Ranges"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"source_range",
"chart_type"
],
"title": "CreateChartParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"chartId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the created chart",
"title": "Chartid"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "CreateChartResult",
"type": "object"
} # create_sheet write
Create a new sheet tab in an existing spreadsheet and return the API creation result.
Full description
Create a new sheet tab in an existing Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
title: The title for the new sheet
index: Optional index position for the new sheet
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "title": "Summary", "tab_color": "#0F9D58"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
title | string | Yes | The title for the new sheet |
index | integer | null | No | Optional index position for the new sheet |
tab_color | string | null | No | Tab color as hex string (#RRGGBB), e.g. '#0F9D58' for green |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"title": {
"description": "The title for the new sheet",
"title": "Title",
"type": "string"
},
"index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional index position for the new sheet",
"title": "Index"
},
"tab_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Tab color as hex string (#RRGGBB), e.g. '#0F9D58' for green",
"title": "Tab Color"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"title"
],
"title": "CreateSheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "CreateSheetResult",
"type": "object"
} # create_spreadsheet write
Create a new Google Spreadsheet, optionally in a Drive folder, and return its metadata and ID.
Full description
Create a new Google Spreadsheet.
Args:
title: The title of the new spreadsheet
folder_id: Optional folder ID to create the spreadsheet in
Returns:
Information about the newly created spreadsheet including its ID
Example: {"title": "Q2 Budget Report"} | Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | The title of the new spreadsheet |
folder_id | string | null | No | Optional folder ID to create the spreadsheet in |
folder_name | string | null | No | Optional folder name. Searches My Drive top-level folders; creates if not found; errors on multiple matches. Ignored if folder_id is provided. |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"title": {
"description": "The title of the new spreadsheet",
"title": "Title",
"type": "string"
},
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional folder ID to create the spreadsheet in",
"title": "Folder Id"
},
"folder_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional folder name. Searches My Drive top-level folders; creates if not found; errors on multiple matches. Ignored if folder_id is provided.",
"title": "Folder Name"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"title"
],
"title": "CreateSpreadsheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"spreadsheetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the created spreadsheet",
"title": "Spreadsheetid"
},
"spreadsheetUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URL of the created spreadsheet",
"title": "Spreadsheeturl"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Title of the created spreadsheet",
"title": "Title"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "CreateSpreadsheetResult",
"type": "object"
} # delete_chart write
Delete a chart by chart ID and return the Google Sheets API update result.
Full description
Delete a chart from a Google Spreadsheet.
Use list_charts to find the chart_id of the chart to delete.
Args:
spreadsheet_id: The ID of the spreadsheet
chart_id: Chart ID to delete
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "chart_id": 12345} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
chart_id | integer | Yes | Chart ID to delete |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"chart_id": {
"description": "Chart ID to delete",
"title": "Chart Id",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"chart_id"
],
"title": "DeleteChartParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "DeleteChartResult",
"type": "object"
} # delete_columns write
Delete a column range from a sheet and return the Google Sheets API result.
Full description
Delete columns from a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start index
end_index: 0-based end index
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 3, "end_index": 5} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start index |
end_index | integer | Yes | 0-based end index |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end index",
"title": "End Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "DeleteColumnsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "DeleteColumnsResult",
"type": "object"
} # delete_named_range write
Delete a named range by ID and return the Google Sheets API update result.
Full description
Delete a named range from a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
named_range_id: The ID of the named range to delete
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "named_range_id": "nrid_abc123"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
named_range_id | string | Yes | The ID of the named range to delete |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"named_range_id": {
"description": "The ID of the named range to delete",
"title": "Named Range Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"named_range_id"
],
"title": "DeleteNamedRangeParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "DeleteNamedRangeResult",
"type": "object"
} # delete_rows write
Delete a row range from a sheet and return the Google Sheets API result.
Full description
Delete rows from a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start index
end_index: 0-based end index
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 5, "end_index": 8} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start index |
end_index | integer | Yes | 0-based end index |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end index",
"title": "End Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "DeleteRowsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "DeleteRowsResult",
"type": "object"
} # delete_sheet write
Delete a sheet tab by sheet ID and return the Google Sheets API update result.
Full description
Delete a sheet from a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet_id: The ID of the sheet to delete
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet_id": 0} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet_id | integer | Yes | The ID of the sheet to delete |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet_id": {
"description": "The ID of the sheet to delete",
"title": "Sheet Id",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet_id"
],
"title": "DeleteSheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "DeleteSheetResult",
"type": "object"
} # duplicate_sheet write
Duplicate a sheet within a spreadsheet, preserving content and formatting, and return the update result.
Full description
Duplicate a sheet within the same spreadsheet.
Creates an exact copy of the source sheet with a new name, preserving all
formatting, formulas, column widths, and conditional formatting.
Args:
spreadsheet_id: The ID of the spreadsheet
source_sheet: The name of the sheet to duplicate
new_title: The title for the duplicated sheet
insert_index: Optional position for the new sheet
Returns:
New sheet properties including sheetId and title
Example: {"spreadsheet_id": "abc123", "source_sheet": "Template", "new_title": "January"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
source_sheet | string | Yes | The name of the sheet to duplicate |
new_title | string | Yes | The title for the duplicated sheet |
insert_index | integer | null | No | Optional 0-based index where the new sheet should be inserted |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"source_sheet": {
"description": "The name of the sheet to duplicate",
"title": "Source Sheet",
"type": "string"
},
"new_title": {
"description": "The title for the duplicated sheet",
"title": "New Title",
"type": "string"
},
"insert_index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional 0-based index where the new sheet should be inserted",
"title": "Insert Index"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"source_sheet",
"new_title"
],
"title": "DuplicateSheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data including new sheet properties",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "DuplicateSheetResult",
"type": "object"
} # fill_formula write
Fill a range with expanded formulas from a template and return the formula update result.
Full description
Fill a range with formulas from a template, expanding placeholders.
Supports both vertical and horizontal fills:
**Vertical** (default): Use {row} placeholder. Range should be a single column.
Example: range="D14:D21", formula="=B{row}*C{row}"
Generates: =B14*C14, =B15*C15, ..., =B21*C21
**Horizontal**: Use {col} (current column letter) and optionally {prev_col}
(previous column letter). Range should be a single row.
Example: range="C3:N3", formula="={col}2*1.1"
Generates: =C2*1.1, =D2*1.1, ..., =N2*1.1
Chain formulas: range="C3:N3", formula="={prev_col}3*(1+rate)"
Generates: =B3*(1+rate), =C3*(1+rate), ..., =M3*(1+rate)
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range for the formula cells
formula: Formula template with {row}, {col}, and/or {prev_col} placeholders
direction: 'vertical' or 'horizontal' (auto-detected if omitted)
Returns:
Number of cells filled
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "D2:D20", "formula": "=B{row}*C{row}"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range for the formula cells (e.g., 'D14:D21' for vertical, 'C3:N3' for horizontal) |
formula | string | Yes | Formula template with placeholders. Vertical: use {row} (e.g., '=B{row}*C{row}'). Horizontal: use {col} for current column letter (e.g., '={col}2*1.1') and optionally {prev_col} for the previous column letter (e.g., '={prev_col}{row}*(1+rate)'). |
direction | "vertical" | "horizontal" | null | No | Fill direction. Auto-detected if not specified: vertical if {row} is present, horizontal if {col} is present. |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range for the formula cells (e.g., 'D14:D21' for vertical, 'C3:N3' for horizontal)",
"title": "Range",
"type": "string"
},
"formula": {
"description": "Formula template with placeholders. Vertical: use {row} (e.g., '=B{row}*C{row}'). Horizontal: use {col} for current column letter (e.g., '={col}2*1.1') and optionally {prev_col} for the previous column letter (e.g., '={prev_col}{row}*(1+rate)').",
"title": "Formula",
"type": "string"
},
"direction": {
"anyOf": [
{
"enum": [
"vertical",
"horizontal"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Fill direction. Auto-detected if not specified: vertical if {row} is present, horizontal if {col} is present.",
"title": "Direction"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"formula"
],
"title": "FillFormulaParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"cellsFilled": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of cells filled with formulas",
"title": "Cellsfilled"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "FillFormulaResult",
"type": "object"
} # format_cells write
Apply Google Sheets CellFormat styling to a range and return the formatting update result.
Full description
Apply formatting to a range of cells using the Google Sheets CellFormat object.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_row: 0-based start row
end_row: 0-based end row
start_column: 0-based start column
end_column: 0-based end column
format_data: Google Sheets CellFormat object with supported keys:
- numberFormat: {type, pattern} where type is NUMBER, PERCENT, CURRENCY, DATE, TIME, or SCIENTIFIC
- textFormat: {bold, italic, strikethrough, fontSize, fontFamily, foregroundColor}
- backgroundColor: {red, green, blue} with float values 0-1
- horizontalAlignment: LEFT, CENTER, or RIGHT
- verticalAlignment: TOP, MIDDLE, or BOTTOM
- borders: {top, bottom, left, right} each with {style, width, color}
- merge: boolean to merge the range
- mergeType: MERGE_ALL, MERGE_COLUMNS, or MERGE_ROWS
Examples:
Percent format: {"numberFormat": {"type": "PERCENT", "pattern": "0.00%"}}
Currency format: {"numberFormat": {"type": "CURRENCY", "pattern": "$#,##0.00"}}
Bold + font size: {"textFormat": {"bold": true, "fontSize": 14}}
Borders: {"borders": {"top": {"style": "thin", "width": 1, "color": {"red": 0, "green": 0, "blue": 0}}}}
Text color + background: {"textFormat": {"foregroundColor": {"red": 1, "green": 1, "blue": 1}}, "backgroundColor": {"red": 0.2, "green": 0.4, "blue": 0.8}}
Combined: {"textFormat": {"bold": true}, "backgroundColor": {"red": 0.9, "green": 0.9, "blue": 0.9}, "horizontalAlignment": "CENTER"}
Note: Text color (foregroundColor) goes INSIDE textFormat, not at the top level.
Cell background color (backgroundColor) goes at the top level. Both can be combined in one call.
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:G1", "format_data": {"textFormat": {"bold": true, "fontSize": 12}, "backgroundColor": "#4285F4"}} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | null | No | A1 notation range (e.g., 'A1:C10'). Use this OR start_row/end_row/start_column/end_column. |
start_row | integer | null | No | 0-based start row (legacy — prefer 'range' with A1 notation) |
end_row | integer | null | No | 0-based end row (legacy — prefer 'range' with A1 notation) |
start_column | integer | null | No | 0-based start column (legacy — prefer 'range' with A1 notation) |
end_column | integer | null | No | 0-based end column (legacy — prefer 'range' with A1 notation) |
format_data | object | Yes | Google Sheets CellFormat object. Supported keys: numberFormat ({type, pattern} - types: NUMBER, PERCENT, CURRENCY, DATE, TIME, SCIENTIFIC), textFormat ({bold, italic, strikethrough, fontSize, fontFamily, foregroundColor}), backgroundColor ({red, green, blue} floats 0-1), horizontalAlignment (LEFT, CENTER, RIGHT), verticalAlignment (TOP, MIDDLE, BOTTOM), borders ({top, bottom, left, right} each with {style, width, color}), merge (boolean), mergeType (MERGE_ALL, MERGE_COLUMNS, MERGE_ROWS) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A1 notation range (e.g., 'A1:C10'). Use this OR start_row/end_row/start_column/end_column.",
"title": "Range"
},
"start_row": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "0-based start row (legacy — prefer 'range' with A1 notation)",
"title": "Start Row"
},
"end_row": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "0-based end row (legacy — prefer 'range' with A1 notation)",
"title": "End Row"
},
"start_column": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "0-based start column (legacy — prefer 'range' with A1 notation)",
"title": "Start Column"
},
"end_column": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "0-based end column (legacy — prefer 'range' with A1 notation)",
"title": "End Column"
},
"format_data": {
"additionalProperties": true,
"description": "Google Sheets CellFormat object. Supported keys: numberFormat ({type, pattern} - types: NUMBER, PERCENT, CURRENCY, DATE, TIME, SCIENTIFIC), textFormat ({bold, italic, strikethrough, fontSize, fontFamily, foregroundColor}), backgroundColor ({red, green, blue} floats 0-1), horizontalAlignment (LEFT, CENTER, RIGHT), verticalAlignment (TOP, MIDDLE, BOTTOM), borders ({top, bottom, left, right} each with {style, width, color}), merge (boolean), mergeType (MERGE_ALL, MERGE_COLUMNS, MERGE_ROWS)",
"title": "Format Data",
"type": "object"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"format_data"
],
"title": "FormatCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "FormatCellsResult",
"type": "object"
} # freeze_panes write
Freeze or unfreeze header rows and columns on a sheet and return the update result.
Full description
Freeze rows and/or columns in a Google Spreadsheet.
Freezing keeps header rows or label columns visible while scrolling
through large datasets. Set frozen_rows=0 and frozen_columns=0 to unfreeze.
IMPORTANT: Merged cells that span across a freeze boundary will cause the
freeze to fail silently or behave unexpectedly. Always freeze BEFORE merging
cells, and only merge within the frozen or unfrozen zone — never across the
boundary. For example, if freezing row 1, do not merge cells from row 1 into
row 2.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
frozen_rows: Number of rows to freeze at the top (0 to unfreeze)
frozen_columns: Number of columns to freeze at the left (0 to unfreeze)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "frozen_rows": 1, "frozen_columns": 1} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
frozen_rows | integer | No | Number of rows to freeze at the top (0 to unfreeze) Default: 0 |
frozen_columns | integer | No | Number of columns to freeze at the left (0 to unfreeze) Default: 0 |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"frozen_rows": {
"default": 0,
"description": "Number of rows to freeze at the top (0 to unfreeze)",
"title": "Frozen Rows",
"type": "integer"
},
"frozen_columns": {
"default": 0,
"description": "Number of columns to freeze at the left (0 to unfreeze)",
"title": "Frozen Columns",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "FreezePanesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "FreezePanesResult",
"type": "object"
} # get_notes read
Get notes from cells in a range of a Google Spreadsheet.
Full description
Get notes from cells in a range of a Google Spreadsheet.
Returns a dictionary mapping cell references (A1 notation) to their note text.
Only cells that have notes are included.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'A1:C10')
Returns:
Dictionary of cell references to note text
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:F20"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'A1:C10') |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'A1:C10')",
"title": "Range",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range"
],
"title": "GetNotesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"notes": {
"additionalProperties": {
"type": "string"
},
"description": "Dictionary mapping cell references to note text",
"title": "Notes",
"type": "object"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GetNotesResult",
"type": "object"
} # get_sheet_data read
Get values from a specific sheet in a Google Spreadsheet, optionally scoped to an A1 range.
Full description
Get data from a specific sheet in a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: Optional A1 notation range (e.g., 'A1:C10')
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:F20"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | null | No | Optional A1 notation range (e.g., 'A1:C10') |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional A1 notation range (e.g., 'A1:C10')",
"title": "Range"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "GetSheetDataParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GetSheetDataResult",
"type": "object"
} # get_sheet_formulas read
Get formulas from a specific sheet, optionally scoped to an A1 range.
Full description
Get formulas from a specific sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: Optional A1 notation range
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "D2:D50"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | null | No | Optional A1 notation range |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional A1 notation range",
"title": "Range"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "GetSheetFormulasParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GetSheetFormulasResult",
"type": "object"
} # get_spreadsheet_metadata read
Get spreadsheet metadata including all sheets and their properties.
Full description
Get spreadsheet metadata including all sheets and their properties.
Args:
spreadsheet_id: The ID of the spreadsheet (found in the URL)
Returns:
Raw spreadsheet metadata from Google Sheets API
Example: {"spreadsheet_id": "abc123"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "GetSpreadsheetMetadataParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GetSpreadsheetMetadataResult",
"type": "object"
} # get_values read
Get values from an A1 range in a Google Sheet.
Full description
Get values from a range.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: Optional A1 notation range (e.g., 'A1:C10')
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:D10"}
Example (formulas): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:D10", "value_render_option": "FORMULA"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | null | No | Optional A1 notation range (e.g., 'A1:C10') |
value_render_option | "FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA" | null | No | How values should be rendered: FORMATTED_VALUE (default, display values), UNFORMATTED_VALUE (raw numbers without formatting), FORMULA (show formulas instead of computed values) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional A1 notation range (e.g., 'A1:C10')",
"title": "Range"
},
"value_render_option": {
"anyOf": [
{
"enum": [
"FORMATTED_VALUE",
"UNFORMATTED_VALUE",
"FORMULA"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How values should be rendered: FORMATTED_VALUE (default, display values), UNFORMATTED_VALUE (raw numbers without formatting), FORMULA (show formulas instead of computed values)",
"title": "Value Render Option"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "GetValuesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GetValuesResult",
"type": "object"
} # group_columns write
Group columns so they can collapse or expand with toggles and return the update result.
Full description
Group columns so they can be collapsed with a +/- toggle.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start column index
end_index: 0-based end column index (exclusive)
collapse: Whether to collapse the group initially (default False)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 2, "end_index": 5, "collapse": false} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start column index |
end_index | integer | Yes | 0-based end column index (exclusive) |
collapse | boolean | No | Whether to collapse the group initially Default: false |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start column index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end column index (exclusive)",
"title": "End Index",
"type": "integer"
},
"collapse": {
"default": false,
"description": "Whether to collapse the group initially",
"title": "Collapse",
"type": "boolean"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "GroupColumnsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GroupColumnsResult",
"type": "object"
} # group_rows write
Group rows so they can collapse or expand with toggles and return the update result.
Full description
Group rows so they can be collapsed with a +/- toggle.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start row index
end_index: 0-based end row index (exclusive)
collapse: Whether to collapse the group initially (default False)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 5, "end_index": 10, "collapse": true} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start row index |
end_index | integer | Yes | 0-based end row index (exclusive) |
collapse | boolean | No | Whether to collapse the group initially Default: false |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start row index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end row index (exclusive)",
"title": "End Index",
"type": "integer"
},
"collapse": {
"default": false,
"description": "Whether to collapse the group initially",
"title": "Collapse",
"type": "boolean"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "GroupRowsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "GroupRowsResult",
"type": "object"
} # insert_columns write
Insert columns at a specified position and return the Google Sheets API update result.
Full description
Insert columns in a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start index
end_index: 0-based end index
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 1, "end_index": 3} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start index |
end_index | integer | Yes | 0-based end index |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end index",
"title": "End Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "InsertColumnsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "InsertColumnsResult",
"type": "object"
} # insert_rows write
Insert rows at a specified position and return the Google Sheets API update result.
Full description
Insert rows in a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start index
end_index: 0-based end index
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 2, "end_index": 5} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start index |
end_index | integer | Yes | 0-based end index |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end index",
"title": "End Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "InsertRowsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "InsertRowsResult",
"type": "object"
} # list_accounts read
List the Google accounts the user has connected for Google Sheets. Returns each account's email, name, and whether it's the current default for this MCP client. Use when the user mentions "my work account" / "my personal account" or asks which accounts are available — then pass `account=<email>` to target a non-default account on Sheets tools. `account=<email>` is supported on all Google Sheets tools.
Full description
Return the user's connected Google accounts for the current MCP client.
Returns:
ListAccountsResult with one entry per connected Google account, including the
account's email, display name (when available), and a boolean flag indicating
which account is the current default for this user + MCP client.
When the user has multiple Google accounts connected, this tool is the canonical
way to discover what's available before invoking other Google Sheets tools with
an explicit `account=...` override. No parameters.
Parameter schema (JSON)
{
"description": "Parameters for list_accounts.",
"properties": {},
"title": "ListAccountsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"ConnectedAccount": {
"description": "A single connected Google account.",
"properties": {
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"is_default": {
"default": false,
"title": "Is Default",
"type": "boolean"
}
},
"title": "ConnectedAccount",
"type": "object"
}
},
"description": "Result of list_accounts.",
"properties": {
"accounts": {
"items": {
"$ref": "#/$defs/ConnectedAccount"
},
"title": "Accounts",
"type": "array"
}
},
"title": "ListAccountsResult",
"type": "object"
} # list_charts read
List all charts in a Google Spreadsheet with their IDs, types, and source ranges.
Full description
List all charts in a Google Spreadsheet with their IDs, types, and source ranges.
Optionally filter by sheet name. Returns chart metadata including chartId,
sheet, chartType, title, sourceRange (A1 notation), anchorCell, width, and height.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: Optional sheet name to filter by
Returns:
List of charts with metadata
Example: {"spreadsheet_id": "abc123"}
Example (filtered): {"spreadsheet_id": "abc123", "sheet": "Dashboard"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | null | No | Filter to a specific sheet (default: all sheets) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Filter to a specific sheet (default: all sheets)",
"title": "Sheet"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "ListChartsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"charts": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of charts with chartId, sheet, chartType, title, sourceRange, anchorCell, width, height",
"title": "Charts"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ListChartsResult",
"type": "object"
} # list_conditional_formats read
List all conditional formatting rules on a sheet with human-readable summaries.
Full description
List all conditional formatting rules on a sheet with human-readable summaries.
Returns each rule's index, range in A1 notation, type (gradient or boolean),
and a description of what the rule does.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
Returns:
List of conditional format rules with index, range, type, and description
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "ListConditionalFormatsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"formats": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of conditional format rules with index, range, type, and description",
"title": "Formats"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ListConditionalFormatsResult",
"type": "object"
} # list_named_ranges read
List all named ranges in a Google Spreadsheet.
Full description
List all named ranges in a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
Returns:
List of named ranges with name, namedRangeId, and range info
Example: {"spreadsheet_id": "abc123"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "ListNamedRangesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"namedRanges": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of named ranges with name, namedRangeId, and range info",
"title": "Namedranges"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ListNamedRangesResult",
"type": "object"
} # list_sheets read
List the names of all sheet tabs in a Google Spreadsheet.
Full description
List the names of all sheet tabs in a spreadsheet.
Args:
spreadsheet_id: Unique identifier from the spreadsheet URL
Returns:
Ordered list of sheet tab names as they appear in the spreadsheet
Example: {"spreadsheet_id": "abc123"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "ListSheetsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"sheets": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of sheet names",
"title": "Sheets"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ListSheetsResult",
"type": "object"
} # list_spreadsheets read
List spreadsheets accessible to the user, optionally filtered by folder, with folder paths.
Full description
List spreadsheets in a folder or all spreadsheets.
Uses a "Discovery & Adoption" model: lists ALL spreadsheets accessible to the user
(not just toolkit-created ones), and lazily tags untagged files with sourceApp
on first discovery. This allows users to work with existing spreadsheets without
requiring explicit registration via the picker.
Args:
folder_id: Optional folder ID to filter by
Returns:
List of spreadsheets with id, title, url, createdTime, modifiedTime, folderPath.
Note: Timestamps (createdTime, modifiedTime) are in UTC format (ISO 8601 with 'Z' suffix).
When displaying results to users, convert timestamps to their local timezone using context
from user memory or location data.
Example: {}
Example (filtered): {"folder_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"} | Parameter | Type | Required | Description |
|---|---|---|---|
folder_id | string | null | No | Optional folder ID to filter by |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional folder ID to filter by",
"title": "Folder Id"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"title": "ListSpreadsheetsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of spreadsheets with id, title, url, createdTime, modifiedTime, and folder_path",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ListSpreadsheetsResult",
"type": "object"
} # merge_cells write
Merge cells in a range with a chosen merge type and return the update result.
Full description
Merge a range of cells in a Google Spreadsheet.
IMPORTANT: Never merge cells across a freeze boundary. Merged cells that
span frozen and unfrozen zones cause freeze_panes to fail silently.
Always freeze first, then merge only within the frozen or unfrozen zone.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range to merge (e.g., 'A1:F1')
merge_type: MERGE_ALL (default), MERGE_COLUMNS, or MERGE_ROWS
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:F1"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range to merge (e.g., 'A1:F1') |
merge_type | "MERGE_ALL" | "MERGE_COLUMNS" | "MERGE_ROWS" | No | Merge type: MERGE_ALL, MERGE_COLUMNS, or MERGE_ROWS Default: "MERGE_ALL" |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range to merge (e.g., 'A1:F1')",
"title": "Range",
"type": "string"
},
"merge_type": {
"default": "MERGE_ALL",
"description": "Merge type: MERGE_ALL, MERGE_COLUMNS, or MERGE_ROWS",
"enum": [
"MERGE_ALL",
"MERGE_COLUMNS",
"MERGE_ROWS"
],
"title": "Merge Type",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range"
],
"title": "MergeCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "MergeCellsResult",
"type": "object"
} # move_spreadsheet_to_trash write
Move a spreadsheet to Google Drive trash and return the Drive operation result.
Full description
Move a Google Spreadsheet to the trash.
This operation moves the spreadsheet to the user's Google Drive trash.
The spreadsheet can be restored from trash within 30 days. After 30 days,
it will be permanently deleted.
Note: This operation requires edit access to the spreadsheet.
Args:
spreadsheet_id: The Google Sheets spreadsheet ID to move to trash
Returns:
Confirmation of the trash operation with the spreadsheet ID
Example: {"spreadsheet_id": "abc123"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The Google Sheets spreadsheet ID to move to trash |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The Google Sheets spreadsheet ID to move to trash",
"title": "Spreadsheet Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "MoveSpreadsheetToTrashParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"spreadsheet_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the trashed spreadsheet",
"title": "Spreadsheet Id"
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Success message",
"title": "Message"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "MoveSpreadsheetToTrashResult",
"type": "object"
} # remove_basic_filter write
Remove a sheet's basic filter so all rows become visible and return the update result.
Full description
Remove the basic filter from a sheet.
Clears the auto-filter controls and any active filter criteria so that
all rows become visible again.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "RemoveBasicFilterParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "RemoveBasicFilterResult",
"type": "object"
} # remove_conditional_format write
Remove a conditional formatting rule by index and return the update result.
Full description
Remove a conditional formatting rule by index.
Use list_conditional_formats first to find the index of the rule to remove.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
index: Index of the rule to remove (0-based)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "index": 0} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
index | integer | Yes | Index of the conditional format rule to remove (use list_conditional_formats to find) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"index": {
"description": "Index of the conditional format rule to remove (use list_conditional_formats to find)",
"title": "Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"index"
],
"title": "RemoveConditionalFormatParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "RemoveConditionalFormatResult",
"type": "object"
} # rename_sheet write
Rename a sheet tab and return the Google Sheets API update result.
Full description
Rename a sheet in a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet to rename
new_name: The new name for the sheet
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "new_name": "Revenue"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet to rename |
new_name | string | Yes | The new name for the sheet |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet to rename",
"title": "Sheet",
"type": "string"
},
"new_name": {
"description": "The new name for the sheet",
"title": "New Name",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"new_name"
],
"title": "RenameSheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "RenameSheetResult",
"type": "object"
} # set_banding write
Apply alternating row colors to a range as native banding and return the update result.
Full description
Apply alternating row colors (banding) to a range.
Creates a banded range with optional header/footer row colors and
alternating data row colors. Much more efficient than applying
per-row formatting manually.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'A1:G20')
header_color: Hex color for header row (e.g., '#4285F4')
first_band_color: Hex color for odd data rows (default '#FFFFFF')
second_band_color: Hex color for even data rows (default '#F3F3F3')
footer_color: Hex color for footer row
Returns:
The bandedRangeId of the created banding
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:G20", "header_color": "#4285F4", "second_band_color": "#E8F0FE"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range to apply banding to (e.g., 'A1:G20') |
header_color | string | null | No | Hex color for the header row (e.g., '#4285F4') |
first_band_color | string | null | No | Hex color for odd data rows (default white) Default: "#FFFFFF" |
second_band_color | string | null | No | Hex color for even data rows (default light gray) Default: "#F3F3F3" |
footer_color | string | null | No | Hex color for the footer row |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range to apply banding to (e.g., 'A1:G20')",
"title": "Range",
"type": "string"
},
"header_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex color for the header row (e.g., '#4285F4')",
"title": "Header Color"
},
"first_band_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "#FFFFFF",
"description": "Hex color for odd data rows (default white)",
"title": "First Band Color"
},
"second_band_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "#F3F3F3",
"description": "Hex color for even data rows (default light gray)",
"title": "Second Band Color"
},
"footer_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex color for the footer row",
"title": "Footer Color"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range"
],
"title": "SetBandingParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"bandedRangeId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the created banded range",
"title": "Bandedrangeid"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetBandingResult",
"type": "object"
} # set_basic_filter write
Enable standard filter dropdowns on a range or sheet and return the update result.
Full description
Enable filter dropdowns on a sheet.
Adds the standard auto-filter controls to the column headers of the
specified range. If no range is given the filter covers the entire
sheet's data extent.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: Optional A1 notation range (defaults to full data extent)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:K161"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | null | No | A1 notation range (e.g., 'A1:K161'). Defaults to the sheet's full data extent if omitted. |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A1 notation range (e.g., 'A1:K161'). Defaults to the sheet's full data extent if omitted.",
"title": "Range"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet"
],
"title": "SetBasicFilterParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetBasicFilterResult",
"type": "object"
} # set_column_width write
Set one or more column widths on a sheet and return the Google Sheets API result.
Full description
Set the width of one or more columns.
Use 1-based column numbers. If end_column is omitted, only start_column
is affected. For setting widths across multiple sheets, use
batch_set_column_width. See also: set_row_height, batch_set_row_height.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_column: 1-based start column number
end_column: 1-based end column number (exclusive). Omit for single column.
width_pixels: Column width in pixels
Returns:
Raw API response data
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_column": 1, "width_pixels": 200} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_column | integer | Yes | 1-based start column number |
end_column | integer | null | No | 1-based end column number (exclusive). If omitted, affects only start_column. |
width_pixels | integer | Yes | Column width in pixels |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_column": {
"description": "1-based start column number",
"title": "Start Column",
"type": "integer"
},
"end_column": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "1-based end column number (exclusive). If omitted, affects only start_column.",
"title": "End Column"
},
"width_pixels": {
"description": "Column width in pixels",
"minimum": 1,
"title": "Width Pixels",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_column",
"width_pixels"
],
"title": "SetColumnWidthParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetColumnWidthResult",
"type": "object"
} # set_conditional_format write
Apply high-level conditional formatting like scales, thresholds, or text rules and return the result.
Full description
Apply conditional formatting to a range using a high-level, flat interface.
Supports 5 rule types:
- color_scale: Gradient color scales (heat maps, sensitivity tables)
- threshold: Highlight cells above/below a value
- text_contains: Highlight cells containing specific text
- top_n: Highlight top/bottom N values or percentages
- custom_formula: Arbitrary formula-based formatting
Colors use hex (#RRGGBB) — converted to Google API format automatically.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'B2:F10')
rule_type: One of color_scale, threshold, text_contains, top_n, custom_formula
index: Rule priority (0 = highest)
Returns:
Raw API response data from Google Sheets API
Example (color scale): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "B2:F10", "rule_type": "color_scale", "preset": "red_white_green"}
Example (threshold): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "C2:C50", "rule_type": "threshold", "comparison": "less_than", "value": 0, "text_color": "#CC0000", "bold": true}
Example (top_n): {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "E2:E100", "rule_type": "top_n", "direction": "top", "count": 5} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'B2:F10') |
rule_type | "color_scale" | "threshold" | "text_contains" | "top_n" | "custom_formula" | Yes | Type of conditional formatting rule |
index | integer | No | Rule priority index (0 = highest priority) Default: 0 |
preset | "red_white_green" | "green_white_red" | "red_yellow_green" | "white_blue" | null | No | Named preset for color_scale rules. Sets colors and midpoint automatically. Explicit color/type params override preset defaults. |
min_color | string | No | Hex color for lowest values (color_scale) Default: "#FF0000" |
mid_color | string | null | No | Hex color for midpoint; omit/null for 2-color scale (color_scale) Default: "#FFFFFF" |
max_color | string | No | Hex color for highest values (color_scale) Default: "#00FF00" |
min_type | "MIN" | "NUMBER" | "PERCENT" | "PERCENTILE" | No | Interpolation type for min point (color_scale) Default: "MIN" |
mid_type | "NUMBER" | "PERCENT" | "PERCENTILE" | No | Interpolation type for mid point (color_scale) Default: "PERCENTILE" |
max_type | "MAX" | "NUMBER" | "PERCENT" | "PERCENTILE" | No | Interpolation type for max point (color_scale) Default: "MAX" |
min_value | string | integer | number | null | No | Value for min point when min_type is not MIN (color_scale) |
mid_value | string | integer | number | null | No | Value for mid point (color_scale) Default: "50" |
max_value | string | integer | number | null | No | Value for max point when max_type is not MAX (color_scale) |
comparison | "greater_than" | "greater_than_or_equal" | "less_than" | "less_than_or_equal" | "equal_to" | "not_equal_to" | "between" | "not_between" | null | No | Comparison operator (threshold) |
value | string | integer | number | null | No | Threshold value, or lower bound for between/not_between (threshold/text_contains) |
value2 | string | integer | number | null | No | Upper bound for between/not_between (threshold) |
background_color | string | null | No | Hex background color for matching cells (threshold/text_contains/top_n/custom_formula) Default: "#FFFF00" |
text_color | string | null | No | Hex font color for matching cells (threshold/text_contains/top_n/custom_formula) |
bold | boolean | No | Bold matching cells (threshold/text_contains/top_n/custom_formula) Default: false |
text | string | null | No | Text to match (text_contains) |
match_type | "contains" | "not_contains" | "starts_with" | "ends_with" | "exact" | null | No | How to match the text (text_contains) Default: "contains" |
direction | "top" | "bottom" | null | No | Rank direction (top_n) |
count | integer | null | No | Number of values to highlight, or percentage if percent=true (top_n) |
percent | boolean | No | Treat count as percentage (top_n) Default: false |
formula | string | null | No | Formula that returns TRUE/FALSE, e.g. '=B2>100' (custom_formula) |
italic | boolean | No | Italic matching cells (custom_formula) Default: false |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'B2:F10')",
"title": "Range",
"type": "string"
},
"rule_type": {
"description": "Type of conditional formatting rule",
"enum": [
"color_scale",
"threshold",
"text_contains",
"top_n",
"custom_formula"
],
"title": "Rule Type",
"type": "string"
},
"index": {
"default": 0,
"description": "Rule priority index (0 = highest priority)",
"title": "Index",
"type": "integer"
},
"preset": {
"anyOf": [
{
"enum": [
"red_white_green",
"green_white_red",
"red_yellow_green",
"white_blue"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Named preset for color_scale rules. Sets colors and midpoint automatically. Explicit color/type params override preset defaults.",
"title": "Preset"
},
"min_color": {
"default": "#FF0000",
"description": "Hex color for lowest values (color_scale)",
"title": "Min Color",
"type": "string"
},
"mid_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "#FFFFFF",
"description": "Hex color for midpoint; omit/null for 2-color scale (color_scale)",
"title": "Mid Color"
},
"max_color": {
"default": "#00FF00",
"description": "Hex color for highest values (color_scale)",
"title": "Max Color",
"type": "string"
},
"min_type": {
"default": "MIN",
"description": "Interpolation type for min point (color_scale)",
"enum": [
"MIN",
"NUMBER",
"PERCENT",
"PERCENTILE"
],
"title": "Min Type",
"type": "string"
},
"mid_type": {
"default": "PERCENTILE",
"description": "Interpolation type for mid point (color_scale)",
"enum": [
"NUMBER",
"PERCENT",
"PERCENTILE"
],
"title": "Mid Type",
"type": "string"
},
"max_type": {
"default": "MAX",
"description": "Interpolation type for max point (color_scale)",
"enum": [
"MAX",
"NUMBER",
"PERCENT",
"PERCENTILE"
],
"title": "Max Type",
"type": "string"
},
"min_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Value for min point when min_type is not MIN (color_scale)",
"title": "Min Value"
},
"mid_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": "50",
"description": "Value for mid point (color_scale)",
"title": "Mid Value"
},
"max_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Value for max point when max_type is not MAX (color_scale)",
"title": "Max Value"
},
"comparison": {
"anyOf": [
{
"enum": [
"greater_than",
"greater_than_or_equal",
"less_than",
"less_than_or_equal",
"equal_to",
"not_equal_to",
"between",
"not_between"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Comparison operator (threshold)",
"title": "Comparison"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Threshold value, or lower bound for between/not_between (threshold/text_contains)",
"title": "Value"
},
"value2": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Upper bound for between/not_between (threshold)",
"title": "Value2"
},
"background_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "#FFFF00",
"description": "Hex background color for matching cells (threshold/text_contains/top_n/custom_formula)",
"title": "Background Color"
},
"text_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hex font color for matching cells (threshold/text_contains/top_n/custom_formula)",
"title": "Text Color"
},
"bold": {
"default": false,
"description": "Bold matching cells (threshold/text_contains/top_n/custom_formula)",
"title": "Bold",
"type": "boolean"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Text to match (text_contains)",
"title": "Text"
},
"match_type": {
"anyOf": [
{
"enum": [
"contains",
"not_contains",
"starts_with",
"ends_with",
"exact"
],
"type": "string"
},
{
"type": "null"
}
],
"default": "contains",
"description": "How to match the text (text_contains)",
"title": "Match Type"
},
"direction": {
"anyOf": [
{
"enum": [
"top",
"bottom"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Rank direction (top_n)",
"title": "Direction"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of values to highlight, or percentage if percent=true (top_n)",
"title": "Count"
},
"percent": {
"default": false,
"description": "Treat count as percentage (top_n)",
"title": "Percent",
"type": "boolean"
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Formula that returns TRUE/FALSE, e.g. '=B2>100' (custom_formula)",
"title": "Formula"
},
"italic": {
"default": false,
"description": "Italic matching cells (custom_formula)",
"title": "Italic",
"type": "boolean"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"rule_type"
],
"title": "SetConditionalFormatParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetConditionalFormatResult",
"type": "object"
} # set_data_validation write
Set validation rules like dropdowns, numeric limits, or formulas and return the update result.
Full description
Set a data validation rule on a range in a Google Spreadsheet.
Supports dropdown lists, numeric constraints, and custom formula validation
to constrain user input in cells.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'B2:B100')
rule: Data validation rule with condition type and values
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "B2:B100", "rule": {"type": "dropdown", "values": ["High", "Medium", "Low"]}} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'B2:B100') |
rule | object | Yes | Data validation rule. Accepts EITHER simplified format OR raw Google API format. SIMPLIFIED formats (auto-converted): Dropdown: {"type": "dropdown", "values": ["High", "Medium", "Low"]}. Number range: {"type": "number_between", "min": 1, "max": 100}. Number comparison: {"type": "number_greater_than", "value": 0}. Text contains: {"type": "text_contains", "value": "hello"}. Custom formula: {"type": "custom_formula", "formula": "=A1>0"}. Checkbox: {"type": "checkbox"}. Optional fields: strict (bool), input_message (str). RAW API format: {"condition": {"type": "ONE_OF_LIST", "values": [{"userEnteredValue": "Bear"}, ...]}, "showCustomUi": true, "strict": true} |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'B2:B100')",
"title": "Range",
"type": "string"
},
"rule": {
"additionalProperties": true,
"description": "Data validation rule. Accepts EITHER simplified format OR raw Google API format. SIMPLIFIED formats (auto-converted): Dropdown: {\"type\": \"dropdown\", \"values\": [\"High\", \"Medium\", \"Low\"]}. Number range: {\"type\": \"number_between\", \"min\": 1, \"max\": 100}. Number comparison: {\"type\": \"number_greater_than\", \"value\": 0}. Text contains: {\"type\": \"text_contains\", \"value\": \"hello\"}. Custom formula: {\"type\": \"custom_formula\", \"formula\": \"=A1>0\"}. Checkbox: {\"type\": \"checkbox\"}. Optional fields: strict (bool), input_message (str). RAW API format: {\"condition\": {\"type\": \"ONE_OF_LIST\", \"values\": [{\"userEnteredValue\": \"Bear\"}, ...]}, \"showCustomUi\": true, \"strict\": true}",
"title": "Rule",
"type": "object"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"rule"
],
"title": "SetDataValidationParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetDataValidationResult",
"type": "object"
} # set_notes write
Set or clear cell notes for comments, assumptions, or citations and return the update result.
Full description
Set or clear notes on cells in a Google Spreadsheet.
Notes appear as hover tooltips on cells, useful for adding source citations,
assumptions, or explanatory context to data.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
notes: Dictionary mapping cell references to note text (empty string clears)
Returns:
Number of cells updated and raw API response data
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "notes": {"B5": "Source: Market data, Mar 2026", "B20": ""}} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
notes | object | Yes | Dictionary mapping cell references (A1 notation) to note text. Use empty string to clear a note. Example: {"B5": "Source: Market data, Mar 2026", "B20": "Source: Apple 10-K FY2025"} |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"notes": {
"additionalProperties": {
"type": "string"
},
"description": "Dictionary mapping cell references (A1 notation) to note text. Use empty string to clear a note. Example: {\"B5\": \"Source: Market data, Mar 2026\", \"B20\": \"Source: Apple 10-K FY2025\"}",
"title": "Notes",
"type": "object"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"notes"
],
"title": "SetNotesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"cells_updated": {
"description": "Number of cells with notes set",
"title": "Cells Updated",
"type": "integer"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success",
"cells_updated"
],
"title": "SetNotesResult",
"type": "object"
} # set_row_height write
Set one or more row heights on a sheet and return the Google Sheets API result.
Full description
Set the height of one or more rows.
Use 1-based row numbers. If end_row is omitted, only start_row is affected.
For setting heights across multiple sheets, use batch_set_row_height.
See also: set_column_width, batch_set_column_width.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_row: 1-based start row number
end_row: 1-based end row number (exclusive). Omit for a single row.
height_pixels: Row height in pixels
Returns:
Raw API response data
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_row": 1, "height_pixels": 40} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_row | integer | Yes | 1-based start row number |
end_row | integer | null | No | 1-based end row number (exclusive). If omitted, affects only start_row. |
height_pixels | integer | Yes | Row height in pixels |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_row": {
"description": "1-based start row number",
"title": "Start Row",
"type": "integer"
},
"end_row": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "1-based end row number (exclusive). If omitted, affects only start_row.",
"title": "End Row"
},
"height_pixels": {
"description": "Row height in pixels",
"minimum": 1,
"title": "Height Pixels",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_row",
"height_pixels"
],
"title": "SetRowHeightParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetRowHeightResult",
"type": "object"
} # set_tab_color write
Set a sheet tab color and return the Google Sheets API update result.
Full description
Set the tab color for a sheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
tab_color: Hex color string (#RRGGBB)
Returns:
Raw API response data
Example: {"spreadsheet_id": "abc123", "sheet": "Dashboard", "tab_color": "#4285F4"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
tab_color | string | Yes | Tab color as hex string (#RRGGBB) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"tab_color": {
"description": "Tab color as hex string (#RRGGBB)",
"title": "Tab Color",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"tab_color"
],
"title": "SetTabColorParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SetTabColorResult",
"type": "object"
} # share_spreadsheet write
Share a spreadsheet with recipients or link access and return the sharing operation result.
Full description
Share a spreadsheet with specific users and/or enable link sharing.
Supports two sharing modes (can be combined):
1. Named recipients: Share with specific email addresses
2. Link sharing: Make accessible to anyone with the link (no Google account required)
Args:
spreadsheet_id: The ID of the spreadsheet (required)
recipients: List of dicts with 'email_address' and 'role' (optional).
Roles: 'reader', 'writer', 'commenter'
link_sharing: Enable "anyone with the link" access (optional).
Valid values: 'reader', 'writer', 'commenter'.
When set, returns a shareable link in the response.
send_notification: Whether to send notification emails for named recipients (default true)
Returns:
ShareSpreadsheetResult with shared_with list, link_sharing_role, and shareable_link
Example: {"spreadsheet_id": "abc123", "link_sharing": "reader"}
Example (named): {"spreadsheet_id": "abc123", "recipients": [{"email_address": "alice@example.com", "role": "writer"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
recipients | array<object> | null | No | List of dicts with 'email_address' and 'role' (reader, writer, commenter) |
link_sharing | "reader" | "writer" | "commenter" | null | No | Enable 'anyone with the link' access. Valid values: reader, writer, commenter |
send_notification | boolean | null | No | Whether to send notification emails for named recipients Default: true |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"recipients": {
"anyOf": [
{
"items": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of dicts with 'email_address' and 'role' (reader, writer, commenter)",
"title": "Recipients"
},
"link_sharing": {
"anyOf": [
{
"enum": [
"reader",
"writer",
"commenter"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Enable 'anyone with the link' access. Valid values: reader, writer, commenter",
"title": "Link Sharing"
},
"send_notification": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": true,
"description": "Whether to send notification emails for named recipients",
"title": "Send Notification"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id"
],
"title": "ShareSpreadsheetParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"link_sharing_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Link sharing role set (reader, writer, or commenter)",
"title": "Link Sharing Role"
},
"shareable_link": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URL for sharing when link_sharing is enabled",
"title": "Shareable Link"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "ShareSpreadsheetResult",
"type": "object"
} # sort_range write
Sort a range by one or more columns and return the Google Sheets API update result.
Full description
Sort a range of cells by one or more columns.
Column identifiers in *sort_specs* can be letters (e.g., 'D') or
0-based integer indices. Specify multiple sort specs for multi-level
sorting (first spec is the primary sort key).
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range to sort (e.g., 'A2:K161')
sort_specs: List of sort specifications with column and order
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A2:K100", "sort_specs": [{"column": "D", "order": "DESCENDING"}]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range to sort (e.g., 'A2:K161') |
sort_specs | array<SortSpec> | Yes | List of sort specifications. Each has a column (letter or 0-based index) and order (ASCENDING or DESCENDING). |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"$defs": {
"SortSpec": {
"properties": {
"column": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Column letter (e.g., 'D') or 0-based column index",
"title": "Column"
},
"order": {
"default": "ASCENDING",
"description": "Sort order",
"enum": [
"ASCENDING",
"DESCENDING"
],
"title": "Order",
"type": "string"
}
},
"required": [
"column"
],
"title": "SortSpec",
"type": "object",
"additionalProperties": false
}
},
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range to sort (e.g., 'A2:K161')",
"title": "Range",
"type": "string"
},
"sort_specs": {
"description": "List of sort specifications. Each has a column (letter or 0-based index) and order (ASCENDING or DESCENDING).",
"items": {
"$ref": "#/$defs/SortSpec"
},
"title": "Sort Specs",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"sort_specs"
],
"title": "SortRangeParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "SortRangeResult",
"type": "object"
} # ungroup_columns write
Remove a column grouping and return the Google Sheets API update result.
Full description
Remove a column grouping.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start column index
end_index: 0-based end column index (exclusive)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 2, "end_index": 5} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start column index |
end_index | integer | Yes | 0-based end column index (exclusive) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start column index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end column index (exclusive)",
"title": "End Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "UngroupColumnsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "UngroupColumnsResult",
"type": "object"
} # ungroup_rows write
Remove a row grouping and return the Google Sheets API update result.
Full description
Remove a row grouping.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
start_index: 0-based start row index
end_index: 0-based end row index (exclusive)
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "start_index": 5, "end_index": 10} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
start_index | integer | Yes | 0-based start row index |
end_index | integer | Yes | 0-based end row index (exclusive) |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"start_index": {
"description": "0-based start row index",
"title": "Start Index",
"type": "integer"
},
"end_index": {
"description": "0-based end row index (exclusive)",
"title": "End Index",
"type": "integer"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"start_index",
"end_index"
],
"title": "UngroupRowsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "UngroupRowsResult",
"type": "object"
} # unmerge_cells write
Unmerge cells in a range and return the Google Sheets API update result.
Full description
Unmerge a range of cells in a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range to unmerge (e.g., 'A1:F1')
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:F1"} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range to unmerge (e.g., 'A1:F1') |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range to unmerge (e.g., 'A1:F1')",
"title": "Range",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range"
],
"title": "UnmergeCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "UnmergeCellsResult",
"type": "object"
} # update_cells write
Update a cell range with 2D data and return the Google Sheets API result.
Full description
Update cells in a Google Spreadsheet.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'A1:C10')
data: 2D array of values to update
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:B2", "data": [["Revenue", 50000], ["Expenses", 32000]]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'A1:C10') |
data | array<array<object>> | Yes | 2D array of values to update |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'A1:C10')",
"title": "Range",
"type": "string"
},
"data": {
"description": "2D array of values to update",
"items": {
"items": {},
"type": "array"
},
"title": "Data",
"type": "array"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"data"
],
"title": "UpdateCellsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
},
"formulaResults": {
"anyOf": [
{
"items": {
"items": {},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Computed values for formula cells after write (only present when formulas were written)",
"title": "Formularesults"
}
},
"required": [
"success"
],
"title": "UpdateCellsResult",
"type": "object"
} # update_chart write
Update an existing chart's properties or source range and return the chart update result.
Full description
Update an existing chart's properties on a Google Spreadsheet.
Patch semantics — only provided fields are changed. Use list_charts to find
chart_id values.
Args:
spreadsheet_id: The ID of the spreadsheet
chart_id: Chart ID to update
title: New chart title
chart_type: Change chart type
source_range: Change data range (requires sheet parameter)
sheet: Sheet name (required if source_range is provided)
x_axis_title: Change X-axis label
y_axis_title: Change Y-axis label
legend_position: Change legend position
series_colors: Change series colors (hex)
anchor_cell: Move chart to this cell
width: Resize width in pixels
height: Resize height in pixels
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "chart_id": 12345, "title": "Updated Title", "series_colors": ["#4285F4", "#EA4335"]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
chart_id | integer | Yes | Chart ID (from create_chart or list_charts) |
title | string | null | No | New chart title |
chart_type | "column" | "bar" | "line" | "area" | "pie" | "scatter" | "combo" | "stacked_column" | "stacked_bar" | "stacked_area" | null | No | Change chart type |
source_range | string | null | No | Change data range in A1 notation |
sheet | string | null | No | Sheet name (required if source_range is provided) |
x_axis_title | string | null | No | Change X-axis label |
y_axis_title | string | null | No | Change Y-axis label |
legend_position | "bottom" | "top" | "right" | "left" | "none" | null | No | Change legend position |
series_colors | array<string> | null | No | Change series colors (hex) |
anchor_cell | string | null | No | Move chart to this cell |
width | integer | null | No | Resize width in pixels |
height | integer | null | No | Resize height in pixels |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"chart_id": {
"description": "Chart ID (from create_chart or list_charts)",
"title": "Chart Id",
"type": "integer"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New chart title",
"title": "Title"
},
"chart_type": {
"anyOf": [
{
"enum": [
"column",
"bar",
"line",
"area",
"pie",
"scatter",
"combo",
"stacked_column",
"stacked_bar",
"stacked_area"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Change chart type",
"title": "Chart Type"
},
"source_range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Change data range in A1 notation",
"title": "Source Range"
},
"sheet": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sheet name (required if source_range is provided)",
"title": "Sheet"
},
"x_axis_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Change X-axis label",
"title": "X Axis Title"
},
"y_axis_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Change Y-axis label",
"title": "Y Axis Title"
},
"legend_position": {
"anyOf": [
{
"enum": [
"bottom",
"top",
"right",
"left",
"none"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Change legend position",
"title": "Legend Position"
},
"series_colors": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Change series colors (hex)",
"title": "Series Colors"
},
"anchor_cell": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Move chart to this cell",
"title": "Anchor Cell"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Resize width in pixels",
"title": "Width"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Resize height in pixels",
"title": "Height"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"chart_id"
],
"title": "UpdateChartParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
}
},
"required": [
"success"
],
"title": "UpdateChartResult",
"type": "object"
} # update_values write
Update values in a range with chosen input parsing and return the Sheets API response.
Full description
Update values in a range.
Args:
spreadsheet_id: The ID of the spreadsheet
sheet: The name of the sheet
range: A1 notation range (e.g., 'A1:C10')
values: 2D array of values to update
value_input_option: How to interpret the input data
Returns:
Raw API response data from Google Sheets API
Example: {"spreadsheet_id": "abc123", "sheet": "Sheet1", "range": "A1:C3", "values": [["Name", "Age", "City"], ["Alice", 30, "NYC"], ["Bob", 25, "LA"]]} | Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheet_id | string | Yes | The ID of the spreadsheet |
sheet | string | Yes | The name of the sheet |
range | string | Yes | A1 notation range (e.g., 'A1:C10'). If only a start cell is given (e.g., 'A1'), the end is auto-inferred from the values array dimensions. |
values | array<array<object>> | Yes | 2D array of values to update |
value_input_option | string | null | No | How to interpret the input data Default: "USER_ENTERED" |
account | string | null | No | Optional Google account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets. |
Parameter schema (JSON)
{
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet",
"title": "Spreadsheet Id",
"type": "string"
},
"sheet": {
"description": "The name of the sheet",
"title": "Sheet",
"type": "string"
},
"range": {
"description": "A1 notation range (e.g., 'A1:C10'). If only a start cell is given (e.g., 'A1'), the end is auto-inferred from the values array dimensions.",
"title": "Range",
"type": "string"
},
"values": {
"description": "2D array of values to update",
"items": {
"items": {},
"type": "array"
},
"title": "Values",
"type": "array"
},
"value_input_option": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "USER_ENTERED",
"description": "How to interpret the input data",
"title": "Value Input Option"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Google account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Google account. Call list_accounts to see which accounts are connected for Google Sheets.",
"title": "Account"
}
},
"required": [
"spreadsheet_id",
"sheet",
"range",
"values"
],
"title": "UpdateValuesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"description": "Whether the operation was successful",
"title": "Success",
"type": "boolean"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Raw API response data",
"title": "Data"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Error message if operation failed",
"title": "Error"
},
"formulaResults": {
"anyOf": [
{
"items": {
"items": {},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Computed values for formula cells after write (only present when formulas were written)",
"title": "Formularesults"
}
},
"required": [
"success"
],
"title": "UpdateValuesResult",
"type": "object"
}