Google Sheets

The Google Sheets connector lets AI agents read, write, and manage spreadsheet data — from reading cell ranges to appending rows, creating spreadsheets, and applying batch updates. All operations go through the official Google Sheets API using OAuth 2.0, with credentials stored encrypted in MCPGate's vault.

Required scopes#

MCPGate requests the following OAuth scopes when you connect a Google Sheets account. All scopes are requested up front so you don't need to re-authorise when enabling additional tools.

ScopePurpose
spreadsheets.readonlyRead spreadsheet metadata and cell data
spreadsheetsWrite, clear, and batch-update spreadsheets
drive.readonlyList spreadsheets via Drive API

Tool reference#

The Google Sheets connector exposes 10 tools: 3 read, 6 write, and 1 delete. Use the MCP Apps page to enable or disable individual tools per app, and the Guardrails page to add fine-grained rules on top.

ToolCategoryDescription
sheets_list_spreadsheetsreadList Google Sheets spreadsheets in the user's Drive
sheets_get_spreadsheetreadGet metadata and sheet names for a spreadsheet
sheets_read_rangereadRead cell values from a spreadsheet range (e.g. Sheet1!A1:D10)
sheets_write_rangewriteWrite values to a spreadsheet range, overwriting existing data
sheets_append_rowswriteAppend rows to a spreadsheet after existing data
sheets_create_spreadsheetwriteCreate a new Google Sheets spreadsheet
sheets_add_sheetwriteAdd a new sheet tab to an existing spreadsheet
sheets_clear_rangewriteClear all values from a spreadsheet range
sheets_batch_updatewriteApply one or more batch update requests to a spreadsheet
sheets_delete_sheetdeleteDelete a sheet tab from a spreadsheet by sheet ID

Write range overwrites data

sheets_write_range overwrites existing cell values without warning. If you want to add data without clobbering existing rows, use sheets_append_rows instead.

Common guardrail recipes#

Read-only access#

Enable only the three read tools and deny all write and delete tools. This is ideal for agents that analyse or report on spreadsheet data without ever modifying it.

Edit preset (no structural changes)#

Enable read tools plus sheets_write_range, sheets_append_rows, sheets_clear_range, and sheets_batch_update. Deny sheets_create_spreadsheet, sheets_add_sheet, and sheets_delete_sheet. This lets the agent edit data without creating or removing sheets.

Restrict to specific spreadsheets#

Apply the allow_values template to all write tools, targeting the spreadsheet_idfield. Provide a list of spreadsheet IDs the agent is permitted to write to, so it cannot modify other spreadsheets in the user's Drive.

Troubleshooting#

  • Range not foundsheets_read_range uses A1 notation (e.g. Sheet1!A1:D10). Ensure the sheet name matches exactly, including case and spaces.
  • Batch update fails with invalid request sheets_batch_update accepts a JSON array of request objects following the Sheets API BatchUpdateSpreadsheetRequest format. Malformed request objects are rejected with a 400 error.
  • Spreadsheet not listedsheets_list_spreadsheets uses the Drive API and only returns spreadsheets owned by or explicitly shared with the connected account.