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.
| Scope | Purpose |
|---|---|
| spreadsheets.readonly | Read spreadsheet metadata and cell data |
| spreadsheets | Write, clear, and batch-update spreadsheets |
| drive.readonly | List 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.
| Tool | Category | Description |
|---|---|---|
| sheets_list_spreadsheets | read | List Google Sheets spreadsheets in the user's Drive |
| sheets_get_spreadsheet | read | Get metadata and sheet names for a spreadsheet |
| sheets_read_range | read | Read cell values from a spreadsheet range (e.g. Sheet1!A1:D10) |
| sheets_write_range | write | Write values to a spreadsheet range, overwriting existing data |
| sheets_append_rows | write | Append rows to a spreadsheet after existing data |
| sheets_create_spreadsheet | write | Create a new Google Sheets spreadsheet |
| sheets_add_sheet | write | Add a new sheet tab to an existing spreadsheet |
| sheets_clear_range | write | Clear all values from a spreadsheet range |
| sheets_batch_update | write | Apply one or more batch update requests to a spreadsheet |
| sheets_delete_sheet | delete | Delete 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 found —
sheets_read_rangeuses 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_updateaccepts a JSON array of request objects following the Sheets API BatchUpdateSpreadsheetRequest format. Malformed request objects are rejected with a 400 error. - Spreadsheet not listed —
sheets_list_spreadsheetsuses the Drive API and only returns spreadsheets owned by or explicitly shared with the connected account.