google-sheets

v1.0.3
com.mcparmory/google-sheets Checked 6 hours ago Published 6 months ago

Create, read, and modify spreadsheet data, formatting, and sheets

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

apply_spreadsheet_updates Apply Spreadsheet Updates

Applies one or more updates to a spreadsheet atomically. All requests are validated before being applied; if any request is invalid, the entire batch fails and no changes are made. Responses mirror the structure of requests, with replies provided only for updates that generate them.

create_spreadsheet Create Spreadsheet

Creates a new spreadsheet with optional configuration for sheets, properties, formatting defaults, and external data sources. Returns the newly created spreadsheet object.

get_spreadsheet Get Spreadsheet

Retrieves a spreadsheet by its ID with optional support for specific cell ranges and grid data. By default, grid data is excluded; use field masks or the includeGridData parameter to include it.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to retrieve. This ID is required to access the correct spreadsheet.
rangesarrayOptional cell ranges to retrieve from the spreadsheet, specified using A1 notation (e.g., A1, A1:D5, or Sheet2!A1:C4). Multiple ranges can be specified to retrieve data from different areas or sheets.…

retrieve_spreadsheet_by_data_filter Retrieve Spreadsheet by Data Filter

Retrieves a spreadsheet by ID with the ability to filter which data ranges are returned. Use data filters to selectively fetch specific portions of the spreadsheet, optionally including grid data.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to retrieve.
dataFiltersarrayOne or more data filters that specify which ranges to return from the spreadsheet. When multiple filters are provided, the response includes data from all matching ranges. If omitted, only spreadsheet…

get_developer_metadata Get Developer Metadata

Retrieves a specific developer metadata entry from a spreadsheet by its unique metadata ID. Use this to access custom metadata properties attached to spreadsheet resources.

ParameterTypeDescription
metadataId *integerThe unique identifier of the developer metadata entry to retrieve. This is a numeric ID assigned when the metadata was created.
spreadsheetId *stringThe unique identifier of the spreadsheet containing the developer metadata you want to retrieve.

search_developer_metadata Search Developer Metadata

Search for developer metadata entries in a spreadsheet that match specified criteria. Returns all metadata matching the provided data filters, which can target specific metadata lookups or location-based regions.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to search for developer metadata.
dataFiltersarrayOne or more data filters that define the search criteria. Metadata matching any of the specified filters will be included in the results. Filters can target specific metadata lookups or location regio…

copy_sheet Copy Sheet

Copies a sheet from one spreadsheet to another and returns the properties of the newly created sheet. If no destination spreadsheet is specified, the sheet is copied within the same spreadsheet.

ParameterTypeDescription
sheetId *integerThe unique identifier of the sheet to copy. This must be a valid sheet ID within the source spreadsheet.
spreadsheetId *stringThe unique identifier of the spreadsheet that contains the sheet you want to copy.
destinationSpreadsheetIdstringThe unique identifier of the spreadsheet where the sheet should be copied to. If omitted, the sheet will be copied within the same spreadsheet.

append_sheet_values Append Sheet Values

Appends values to the next row of a detected data table in a spreadsheet. The operation automatically locates the table within the specified range and adds new rows starting from the first column of that table.

ParameterTypeDescription
range *stringThe range in A1 notation where the operation should search for an existing data table. New values will be appended to the row immediately following the last row of the detected table.
spreadsheetId *stringThe unique identifier of the spreadsheet to update.
includeValuesInResponsebooleanWhen enabled, the response will include the actual values that were appended to the spreadsheet. By default, the response omits the appended values.
insertDataOptionstringSpecifies how new data should be inserted: OVERWRITE replaces existing data, while INSERT_ROWS creates new rows for the appended data.
majorDimensionstringSpecifies whether the input array is organized by rows or columns. Defaults to ROWS, where each inner array represents a single row. Use COLUMNS if each inner array represents a single column.
valueInputOptionstringSpecifies how the input data should be interpreted: RAW treats values as-is, while USER_ENTERED applies the same parsing as if entered through the Sheets UI (e.g., formulas, dates).
valuesarrayA two-dimensional array of values to append, where each inner array represents either a row or column depending on majorDimension. Supported types are boolean, string, and number. Null values are igno…

clear_spreadsheet_values Clear Spreadsheet Values

Clears all values from one or more specified ranges in a spreadsheet while preserving cell formatting, data validation, and other properties. Useful for resetting data while maintaining spreadsheet structure.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to update. This ID can be found in the spreadsheet URL.
rangesarrayOne or more cell ranges to clear, specified using A1 notation (e.g., Sheet1!A1:B2) or R1C1 notation. If omitted, no ranges will be cleared. Order of ranges does not affect the operation.

clear_spreadsheet_values_by_filter Clear Spreadsheet Values by Filter

Clears cell values from a spreadsheet based on one or more data filters, while preserving all formatting, validation rules, and other cell properties. Use this to selectively remove data from ranges matching your specified filter criteria.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to update. This ID is typically found in the spreadsheet's URL.
dataFiltersarrayOne or more data filters that define which ranges to clear. Each filter is evaluated independently, and all ranges matching any filter will have their values cleared. If not specified, no ranges will…

get_spreadsheet_values_batch Get Spreadsheet Values Batch

Retrieves one or more ranges of values from a spreadsheet. Specify the spreadsheet ID and one or more ranges to fetch, with options to control how values and dates are formatted in the response.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to retrieve data from.
dateTimeRenderOptionstringControls how dates, times, and durations are represented in the output. Choose between serial number format (numeric representation) or formatted string. This setting is ignored if values are returned…
majorDimensionstringDetermines the orientation of returned data. Use ROWS to return data organized by rows (each inner array is a row), COLUMNS to return data organized by columns (each inner array is a column), or DIMEN…
rangesarrayThe cell ranges to retrieve, specified in A1 notation or R1C1 notation. Provide as an array of range strings (e.g., ['A1:B10', 'D5:E20']). If omitted, the entire sheet is retrieved.
valueRenderOptionstringControls how cell values are represented in the output. Choose FORMATTED_VALUE to return values as displayed in the spreadsheet, UNFORMATTED_VALUE for raw values, or FORMULA to return formulas as text…

get_spreadsheet_values_by_filter Get Spreadsheet Values by Filter

Retrieves one or more ranges of values from a spreadsheet that match specified data filters. Multiple ranges matching any of the provided filters are returned in a single response.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to retrieve data from.
dataFiltersarrayOne or more data filters that define which ranges to retrieve. Any ranges matching at least one filter will be included in the response.
dateTimeRenderOptionstringControls how dates, times, and durations are formatted in the output. Choose SERIAL_NUMBER for numeric representation or FORMATTED_STRING for human-readable text. This setting is ignored when valueRen…
majorDimensionstringSpecifies whether results should be organized by rows or columns. ROWS returns data as nested arrays where each inner array is a row; COLUMNS returns data where each inner array is a column. Defaults…
valueRenderOptionstringControls how cell values are represented in the output. FORMATTED_VALUE shows values as displayed in the spreadsheet, UNFORMATTED_VALUE shows raw values, and FORMULA shows the actual formulas. Default…

update_sheet_values_batch Batch Update Sheet Values

Updates multiple ranges of cells in a spreadsheet with new values. Specify which ranges to update, how to interpret the input data, and optionally request the updated values in the response.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to update.
dataarrayAn array of value ranges to update, where each range specifies the target cells and the values to write. Order matters as ranges are processed sequentially.
includeValuesInResponsebooleanWhen enabled, the response includes the actual values written to the cells, including all values in the requested range (excluding trailing empty rows and columns). Disabled by default.
valueInputOptionstringSpecifies how the input data should be interpreted: RAW treats values as-is without formula parsing, USER_ENTERED parses formulas and formats like a user entering data manually, or UNSPECIFIED uses th…

update_spreadsheet_values_by_filter Update Spreadsheet Values by Filter

Updates cell values in one or more ranges of a spreadsheet using data filters to target specific cells. Allows you to set values across multiple matched ranges simultaneously and optionally retrieve the updated values in the response.

ParameterTypeDescription
spreadsheetId *stringThe unique identifier of the spreadsheet to update.
dataarrayArray of data filter value ranges specifying which cells to update and what values to apply. When multiple ranges match a filter, the same values are applied to all matched ranges.
includeValuesInResponsebooleanIf true, the response will include the actual values that were written to the cells. By default, responses omit updated values. When enabled, the response includes all values in the requested range, e…
valueInputOptionstringSpecifies how the input data should be interpreted: RAW treats values as-is without parsing, USER_ENTERED applies the same parsing as if entered through the Sheets UI (formulas, dates, etc.), or INPUT…

clear_spreadsheet_values_range Clear Spreadsheet Values Range

Clears all values from specified cells in a spreadsheet while preserving formatting, data validation, and other cell properties. Specify the spreadsheet and target range using A1 or R1C1 notation.

ParameterTypeDescription
range *stringThe cells to clear, specified using A1 notation (e.g., Sheet1!A1:B10) or R1C1 notation. Supports single cells, ranges, and multiple ranges.
spreadsheetId *stringThe unique identifier of the spreadsheet to update. This ID is typically found in the spreadsheet's URL.

read_spreadsheet_range Read Spreadsheet Range

Retrieves cell values from a specified range in a spreadsheet. Supports flexible formatting options for dates, times, and formulas, with configurable output structure.

ParameterTypeDescription
range *stringThe cell range to retrieve, specified using A1 notation (e.g., Sheet1!A1:B10) or R1C1 notation.
spreadsheetId *stringThe unique identifier of the spreadsheet to read from.
dateTimeRenderOptionstringControls how dates, times, and durations are formatted in the response. Choose SERIAL_NUMBER for numeric representation or FORMATTED_STRING for human-readable text. Ignored when valueRenderOption is s…
majorDimensionstringDetermines the structure of the returned data. ROWS returns data organized by rows (default behavior), COLUMNS returns data organized by columns. This affects how nested arrays are structured in the r…
valueRenderOptionstringSpecifies how cell values should be represented. FORMATTED_VALUE returns values as displayed in the spreadsheet, UNFORMATTED_VALUE returns raw values, and FORMULA returns the actual formulas. Defaults…

update_sheet_values Update Sheet Values

Updates cell values in a spreadsheet within a specified range using A1 notation. Specify how input data should be interpreted (raw or user-entered formulas) and optionally retrieve the updated values in the response.

ParameterTypeDescription
range *stringThe target range in A1 notation (e.g., 'Sheet1!A1:B10') where values will be written.
spreadsheetId *stringThe unique identifier of the spreadsheet to update.
includeValuesInResponsebooleanWhen enabled, the response includes the actual values written to the cells. By default, responses omit updated values.
majorDimensionstringDetermines how the values array is organized: ROWS means each inner array represents a row, COLUMNS means each inner array represents a column. Defaults to ROWS if unspecified.
valueInputOptionstringSpecifies how input data should be interpreted: RAW treats values as-is, USER_ENTERED evaluates formulas and formats. Defaults to RAW if unspecified.
valuesarrayA 2D array of values to write, where each inner array represents either a row or column depending on majorDimension. Supported types are boolean, string, and number; null values are ignored, and empty…