Google Sheets

v2.6.5
io.github.mcp-z/mcp-sheets Checked 1 hour ago Published 8 days ago

Google Sheets integration with OAuth, spreadsheet management, batch operations, and formatting

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

account-list

List all linked mcp-sheets accounts with their aliases and active status.

account-me

Show current mcp-sheets user identity. Returns email, alias (if set), and session expiry information.

account-remove

Remove mcp-sheets account and delete stored tokens permanently. If removing the active account, the first remaining account becomes active. Requires email or alias parameter.

ParameterTypeDescription
accountId *stringEmail address or alias of account to remove

account-switch

Use mcp-sheets account (smart mode). If email/alias provided and already linked, switches to it without triggering OAuth. If not linked or no email provided, triggers OAuth browser flow to add account. Returns account email, whether it was newly added, and total account count.

ParameterTypeDescription
aliasstringOptional alias for easy identification
emailstringEmail address to link (if already linked, switches without OAuth)

cells-copy

Copy a cell range to another range in the same spreadsheet (same or different tab), like Google Sheets copy and paste-special. Default PASTE_NORMAL copies values, formulas (relative references adjust), formats and merges; pasteType selects one native paste-special mode. Cannot copy between spreadsheets: use sheet-copy-to first. To duplicate a whole tab or workbook use sheet-copy, sheet-copy-to or spreadsheet-copy. Use a1-notation prompt for range syntax.

ParameterTypeDescription
destinationGid *Destination sheet ID in the same spreadsheet; may equal sourceGid
destinationRange *stringTop-left cell (e.g., "E1") or a finite range whose height and width are whole multiples of the (oriented) source; a larger range repeats the source to fill it
id *stringSpreadsheet ID (from URL d/{id})
sourceGid *Source sheet ID (from URL gid={gid})
sourceRange *stringFinite sheet-local A1 range to copy (e.g., "A1:C10"; no sheet prefix, no whole rows/columns)
pasteOrientationstringNORMAL, or TRANSPOSE (rows become columns and vice versa)
pasteTypestringWhat to paste. PASTE_NORMAL (default) = values, formulas, formats and merges; PASTE_VALUES = values only, no formats/formulas/merges; PASTE_FORMAT = format only, excluding data validation; PASTE_NO_BO…

cells-format

Apply formatting (colors, borders, fonts, alignment, number formats) to cell ranges without modifying data. Supports batch operations for efficiency. Colors use 0-1 RGB format. Best for creating professional, visually organized spreadsheets. Date/time cells: numberFormat {type:"DATE", pattern:"yyyy-mm-dd hh:mm"} only displays a numeric serial as a date; it does not convert text. Dates: a date-looking string is not necessarily a native date. See values-batch-update for the native-date write, format and read-back steps.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
requests *arrayArray of formatting requests. Batch multiple ranges for efficiency.

cells-metadata-get

Read notes, data validation rules, pivot table and data-source table definitions in required finite ranges on one sheet. Preserves sparse row/column offsets. Excludes cell values, formulas and direct formatting. DATA_SOURCE and OBJECT sheets are unsupported.

ParameterTypeDescription
gid *Sheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
ranges *arrayRequired finite sheet-local A1 ranges, such as A1 or B2:D10, for notes, dataValidation, pivotTable and dataSourceTable. Maximum 50 ranges and 250,000 aggregate cells, counting overlapping ranges separ…

chart-create

Create charts (pie, bar, column, line) from spreadsheet data ranges. Charts anchor to specific cells with optional pixel offsets. Data range should include headers. PIE charts use 2 columns (labels, values). BAR/COLUMN/LINE charts use first row as headers. Best for visualizing spreadsheet data.

ParameterTypeDescription
chartType *stringType of chart to create
dataRange *stringA1 notation range containing chart data including headers (e.g., "A1:C10")
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
position *object
is3DbooleanRender as 3D chart (PIE only)
legendstringLegend position
titlestringChart title displayed at top

columns-get

Get first row from Google Sheet. Returns columns array and isEmpty flag.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
renderstringHow to render cell values. FORMATTED_VALUE (default): calculated with formatting. UNFORMATTED_VALUE: calculated without formatting; native dates come back as numeric serials (days since 1899-12-30), t…

columns-update

Update spreadsheet data by column headers with intelligent upsert logic. Supports adding missing columns, flexible update behaviors, and robust error handling. Uses column names as keys for matching existing rows, enabling context-aware data synchronization workflows. Dates: a date-looking string is not necessarily a native date. See values-batch-update for the native-date write, format and read-back steps.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
headers *arrayArray of column names/headers (max 50 columns). Must match the length of each row in the rows array
id *stringSpreadsheet ID (from URL d/{id})
rows *arrayArray of rows to upsert (max 1000 rows per request). Each row is an array of cell values matching the headers array
updateBy *arrayArray of column names to use as unique keys for matching existing rows (max 10 key columns). These columns must exist in the headers array
behaviorstringUpdate behavior: add-or-update (default) adds new rows and updates existing, update-only skips new rows, add-only skips existing rows. BEST FOR: Bulk upsert operations with key matching in structured…
valueInputOptionstringHow input data should be interpreted (default USER_ENTERED = parsed like user input with formulas, dates per the workbook locale, etc.; RAW = exact values, date strings stay text, numeric serials stay…

csv-get-columns

Get first row from CSV file (streaming, no memory overhead). Returns columns array and isEmpty flag.

ParameterTypeDescription
sourceUri *stringCSV file URI (file://, http://, https://)

dimensions-batch-update

Batch update sheet dimensions by inserting, deleting, or appending rows/columns. Operations are atomic (all succeed or all fail) and execute in optimal order automatically.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
requests *arrayArray of dimension update requests

dimensions-move

Move rows or columns within a sheet to a new position. Use 0-based indices. The destinationIndex is where the rows/columns will be moved TO.

ParameterTypeDescription
destinationIndex *integerIndex where the rows/columns will be moved to (0-based)
dimension *stringWhether to move rows or columns
endIndex *integerEnding index of the range to move (0-based, exclusive)
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
startIndex *integerStarting index of the range to move (0-based)

rows-append

Add new rows to the bottom of an existing sheet with smart header handling and optional deduplication. BEST FOR: Structured database operations where spreadsheet has headers defining schema and rows represent records. Values are always written RAW (no parsing), so a date string stays text; write numeric serials and then apply a date format with cells-format. Dates: a date-looking string is not necessarily a native date. See values-batch-update for the native-date write, format and read-back steps.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
rows *arrayArray of rows, where each row is an array of cell values. Use null to skip a cell (preserve existing value), empty string "" to clear it.
deduplicateByarrayColumn names to use as composite key for deduplication
headersarrayColumn order/names - used for blank sheets or column mapping

rows-csv-append

Import CSV to Google Sheets with column mapping and optional deduplication. Streams data for large files. Rows are always appended USER_ENTERED, so date-looking CSV text may be parsed as native dates per the workbook locale; read back with UNFORMATTED_VALUE to confirm. Dates: a date-looking string is not necessarily a native date. See values-batch-update for the native-date write, format and read-back steps.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
headerMap *arrayColumn mappings from CSV to sheet
id *stringSpreadsheet ID (from URL d/{id})
sourceUri *stringCSV file URI (file://, http://, https://)
deduplicateByarraySheet columns for deduplication (names or indices)
sourceHasHeadersbooleanSource has header row for column name mapping. Set to false for data-only sources (numeric indices required).

rows-get

Fetch row data from a specific range in A1 notation. Best used after values-search to get surrounding context. Use a1-notation prompt for syntax reference.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
range *stringA1 notation range to fetch (e.g., "B5", "A5:D5", "B:B", "5:5")
renderstringHow to render cell values. FORMATTED_VALUE (default): calculated with formatting. UNFORMATTED_VALUE: calculated without formatting; native dates come back as numeric serials (days since 1899-12-30), t…

sheet-copy

Copy a sheet/tab within the same spreadsheet. Supports batch copying: create multiple copies from a single source sheet (e.g., create 12 monthly sheets from a template). Copies all data, formatting, charts, and conditional formatting verbatim.

ParameterTypeDescription
copies *arrayArray of copies to create from the source sheet
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})

sheet-copy-to

Copy a sheet to another spreadsheet. Copies all data, formatting, and charts.

ParameterTypeDescription
destinationId *stringDestination spreadsheet ID
sourceGid *stringSource sheet grid ID to copy
sourceId *stringSource spreadsheet ID
newTitlestringNew name for the copied sheet (optional, will use auto-generated name if not provided)

sheet-create

Create a new sheet/tab in the spreadsheet/workbook

ParameterTypeDescription
id *stringSpreadsheet ID (from URL d/{id})
sheetTitle *stringName for the new sheet tab

sheet-delete

Permanently delete sheets from a spreadsheet. Cannot delete the last remaining sheet.

ParameterTypeDescription
gids *arraySheet grid IDs to permanently delete
id *stringSpreadsheet ID (from URL d/{id})

sheet-find

Find an existing sheet/tab within a known spreadsheet by title or GUID

ParameterTypeDescription
id *stringSpreadsheet ID (from URL d/{id})
sheetRef *stringSheet reference: exact title or partial name match (not ID - use sheet-find to get ID)

sheet-rename

Rename a sheet within a spreadsheet.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
newTitle *stringNew name for the sheet tab

spreadsheet-copy

Copy an entire spreadsheet/workbook (all sheets, formatting, charts, named ranges, etc.). Creates in the same folder as the original. Uses Google Drive API.

ParameterTypeDescription
id *stringSpreadsheet ID (from URL d/{id})
newTitlestringName for the copy (optional, defaults to "Copy of [original]")

spreadsheet-create

Create a new spreadsheet

ParameterTypeDescription
title *stringTitle for the new spreadsheet

spreadsheet-find

Find spreadsheet by ID, URL, or name. Returns all sheets/tabs in response.

ParameterTypeDescription
spreadsheetRef *stringSpreadsheet reference: full URL, exact name, or partial name (not ID - use spreadsheet-find to get ID)

spreadsheet-metadata-get

Read full workbook and sheet properties plus charts, named ranges, protections, conditional formats, tables, filters, banded ranges, merges, slicers, developer metadata, data sources and schedules. Returns all sheets without grid data, values or direct cell formatting.

ParameterTypeDescription
id *stringSpreadsheet ID (from URL d/{id})

spreadsheet-rename

Rename a spreadsheet/workbook (the entire document, not individual sheets/tabs)

ParameterTypeDescription
id *stringSpreadsheet ID (from URL d/{id})
newTitle *stringNew name for the spreadsheet

validation-set

Add data validation rules including dropdowns, numeric constraints, text patterns, date ranges, custom formulas. Supports batch operations for efficiency. Use discriminated conditionType to specify rule type. Best for enforcing data integrity and providing user-friendly input controls.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
requests *arrayArray of validation rules. Batch multiple ranges for efficiency.

values-batch-update

Batch update multiple cell ranges. RAW=exact values, USER_ENTERED=parsed like user input. Use a1-notation prompt for range syntax. For multiple clickable links or rich text inside a single cell, use values-markdown-update. NATIVE DATES: a native Sheets date/time is a serial number plus a date number format. The integer counts days from 1899-12-30; the fraction is the time of day (46334.5 = 2026-11-08 12:00, with a matching format). A serial carries no timezone of its own and is read in the spreadsheet's timezone. RAW stores values as supplied, so a date-looking string stays text; a numeric ser…

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
includeData *booleanWhether to include updated cell values in the response
requests *arrayArray of value update requests
valueInputOption *stringHow input data should be interpreted (required; no default is applied by the schema). RAW = exact values: date strings stay text, numeric serials stay numbers. USER_ENTERED = parsed like user input: d…

values-clear

Clear cell values from one or more ranges. Clears values only - preserves formatting, validation, and other cell properties. Use a1-notation prompt for range syntax.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
ranges *arrayA1 notation ranges to clear (e.g., ["A1:B5", "D3:D10"]). Clears values only, preserves formatting.

values-csv-update

Import CSV to sheet range. Overwrites existing data at startRange. Use rows-csv-append for database-style appends with deduplication. Dates: a date-looking string is not necessarily a native date. See values-batch-update for the native-date write, format and read-back steps.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
sourceUri *stringCSV file URI (file://, http://, https://)
sourceHasHeadersbooleanFirst row is headers (metadata) - exclude from data range. Set to false to include first row as data.
startRangestringTop-left cell where CSV data starts (default: A1)
valueInputOptionstringHow to interpret values (default USER_ENTERED = parse formulas/dates per the workbook locale; RAW = exact, date-looking CSV text stays text)

values-markdown-update

Replace cell content with text parsed from inline markdown. Supports [label](url) links, bare URLs, **bold**, *italic*, ~~strikethrough~~ — the only way to put MULTIPLE clickable links in one cell. Block syntax (headers, lists, tables) and other unsupported markdown is written as literal text. Writes text cells only — no formula or number coercion. For whole-cell formatting (colors, borders, number formats) use cells-format.

ParameterTypeDescription
gid *stringSheet ID (from URL gid={gid})
id *stringSpreadsheet ID (from URL d/{id})
requests *arrayArray of cell markdown requests. Batch multiple cells for efficiency.

values-replace

Find and replace text across a spreadsheet. Searches all sheets by default, or limit with gid/range. Supports regex with capture groups ($1, $2).

ParameterTypeDescription
find *stringText or regex pattern to find
id *stringSpreadsheet ID (from URL d/{id})
replacement *stringReplacement text. Use $1, $2 for regex capture groups. Empty string deletes matches.
gidstringLimit to specific sheet. If omitted, searches all sheets.
includeFormulasbooleanSearch within formula text
matchCasebooleanCase-sensitive matching
matchEntireCellbooleanOnly match entire cell content
rangestringLimit to specific A1 range within the sheet (requires gid)
searchByRegexbooleanTreat find as RE2 regex