Sheets Update Sheet Values
sheets_update_sheet_valuesWrite values into a single A1 range in Google Sheets, overwriting covered cells; use it when you need to replace existing cell contents rather than append rows.
Instructions
Write values into one A1 range of a Google Sheets spreadsheet, overwriting the cells it covers. To add rows below existing data use sheets_append_sheet_values, and for formatting or tab changes use sheets_batch_update_spreadsheet (extended tool tier); the spreadsheet_id comes from drive_list_files, search_workspace or sheets_create_spreadsheet. Returns status ok, spreadsheet_id, updated_range, updated_rows, updated_columns, updated_cells and updated_values (the written cells with include_values_in_response, else null).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"range_a1": "<range_a1>",
"spreadsheet_id": "<spreadsheet_id>",
"values": "<values>"
},
"name": "sheets_update_sheet_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Rows written from the range's top-left cell, each a list of cell values, e.g. [['Name', 'Total'], ['Ana', 42]]; they must fit inside range_a1, a null skips a cell and an empty string clears it. | |
| range_a1 | Yes | Range to write. Basic A1 notation with an optional sheet prefix: 'Sheet1!A1:C10', 'A1', 'A:C' (whole columns) or '1:5' (whole rows); quote sheet names that contain spaces ('My Sheet'!A1:B2). A bare sheet name or an open-ended range such as A2:C is rejected, and without a prefix the first sheet is used. | |
| spreadsheet_id | Yes | Google Sheets spreadsheet ID: the Drive file ID, also the long ID in the spreadsheet's URL. | |
| value_input_option | No | How values are interpreted: USER_ENTERED parses them as if typed into the UI (formulas, numbers, dates); RAW stores them exactly as given, so a string such as '=SUM(A1:A3)' stays text. | RAW |
| include_values_in_response | No | Also return the written cells, as stored after parsing, in updated_values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Machine-readable operation status. | |
| updated_rows | No | ||
| updated_cells | No | ||
| updated_range | No | ||
| spreadsheet_id | No | ||
| updated_values | No | ||
| updated_columns | No |