> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routemcp.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheets

> Google Sheets API v4 — create spreadsheets, read/write cell values, and apply structural edits (sheets, dimensions, formatting, filters, charts, named/protected ranges) via batchUpdate. 48 tools accessible through the MCP runtime endpoint.

<img src="https://lh3.googleusercontent.com/g9B1KMQSo_Ety8smh0APcuPh4yuwZTK0vxh5PPeO1FwacwCpnOdkA-NWIMgoLMGmT-Mk4fPb6QlkbXnGm_BA=w80-h80" alt="Google Sheets" style={{ width: "48px", height: "48px", marginBottom: "16px" }} />

## Overview

| Property   | Value                           |
| ---------- | ------------------------------- |
| Slug       | `google-sheets`                 |
| Category   | Documents & Storage             |
| Auth       | OAuth 2.0 + PKCE                |
| Base URL   | `https://sheets.googleapis.com` |
| Tool count | 48                              |
| Rate limit | 5 req/sec, 250 req/min          |

## Supported tools

All 48 slugs surfaced through MCP:

| Area                                     | Slugs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Spreadsheet                              | `GOOGLE_SHEETS_CREATE_SPREADSHEET`, `GOOGLE_SHEETS_GET_SPREADSHEET_INFO`, `GOOGLE_SHEETS_GET_SPREADSHEET_BY_DATA_FILTER`, `GOOGLE_SHEETS_GET_SHEET_NAMES`, `GOOGLE_SHEETS_UPDATE_SPREADSHEET_PROPERTIES`                                                                                                                                                                                                                                                                                                                                                                                          |
| Values                                   | `GOOGLE_SHEETS_VALUES_GET`, `GOOGLE_SHEETS_VALUES_UPDATE`, `GOOGLE_SHEETS_VALUES_APPEND`, `GOOGLE_SHEETS_CLEAR_VALUES`, `GOOGLE_SHEETS_BATCH_GET`, `GOOGLE_SHEETS_BATCH_UPDATE_VALUES`, `GOOGLE_SHEETS_BATCH_CLEAR`, `GOOGLE_SHEETS_BATCH_GET_BY_DATA_FILTER`, `GOOGLE_SHEETS_BATCH_UPDATE_VALUES_BY_DATA_FILTER`, `GOOGLE_SHEETS_BATCH_CLEAR_BY_DATA_FILTER`                                                                                                                                                                                                                                     |
| Sheets / tabs                            | `GOOGLE_SHEETS_ADD_SHEET`, `GOOGLE_SHEETS_DELETE_SHEET`, `GOOGLE_SHEETS_UPDATE_SHEET_PROPERTIES`, `GOOGLE_SHEETS_COPY_SHEET_TO`                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Dimensions                               | `GOOGLE_SHEETS_INSERT_DIMENSION`, `GOOGLE_SHEETS_APPEND_DIMENSION`, `GOOGLE_SHEETS_DELETE_DIMENSION`, `GOOGLE_SHEETS_UPDATE_DIMENSION_PROPERTIES`, `GOOGLE_SHEETS_AUTO_RESIZE_DIMENSIONS`                                                                                                                                                                                                                                                                                                                                                                                                         |
| Formatting, filters, validation & charts | `GOOGLE_SHEETS_FORMAT_CELL`, `GOOGLE_SHEETS_FIND_REPLACE`, `GOOGLE_SHEETS_SET_BASIC_FILTER`, `GOOGLE_SHEETS_CLEAR_BASIC_FILTER`, `GOOGLE_SHEETS_GET_CONDITIONAL_FORMAT_RULES`, `GOOGLE_SHEETS_ADD_CONDITIONAL_FORMAT_RULE`, `GOOGLE_SHEETS_UPDATE_CONDITIONAL_FORMAT_RULE`, `GOOGLE_SHEETS_DELETE_CONDITIONAL_FORMAT_RULE`, `GOOGLE_SHEETS_GET_DATA_VALIDATION_RULES`, `GOOGLE_SHEETS_SET_DATA_VALIDATION_RULE`, `GOOGLE_SHEETS_CREATE_CHART`, `GOOGLE_SHEETS_UPDATE_CHART`, `GOOGLE_SHEETS_DELETE_CHART`, `GOOGLE_SHEETS_MERGE_CELLS`, `GOOGLE_SHEETS_UNMERGE_CELLS`, `GOOGLE_SHEETS_SORT_RANGE` |
| Developer metadata                       | `GOOGLE_SHEETS_SEARCH_DEVELOPER_METADATA`, `GOOGLE_SHEETS_GET_DEVELOPER_METADATA`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Named / protected ranges & borders       | `GOOGLE_SHEETS_ADD_NAMED_RANGE`, `GOOGLE_SHEETS_DELETE_NAMED_RANGE`, `GOOGLE_SHEETS_ADD_PROTECTED_RANGE`, `GOOGLE_SHEETS_DELETE_PROTECTED_RANGE`, `GOOGLE_SHEETS_UPDATE_BORDERS`                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Escape hatch                             | `GOOGLE_SHEETS_BATCH_UPDATE`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

## Connect setup

Google Sheets uses Google's OAuth 2.0 with PKCE. You need a Google Cloud project with the **Google Sheets API** enabled and OAuth credentials configured for a Web application.

<Steps>
  <Step title="Create a Google Cloud OAuth client">
    Go to [Google Cloud Console → APIs & Services → Credentials](https://console.cloud.google.com/apis/credentials), choose **Create credentials → OAuth client ID → Web application**, then copy the **Client ID** and **Client Secret**.
  </Step>

  <Step title="Add the redirect URI">
    Under **Authorized redirect URIs**, add:

    ```
    https://api.routemcp.io/api/v1/connect/oauth/callback
    ```
  </Step>

  <Step title="Enable the Google Sheets API">
    In **APIs & Services → Library**, search for **Google Sheets API** and click **Enable** on the same Google Cloud project.
  </Step>

  <Step title="Configure required scopes">
    Add these scopes on the OAuth consent screen:

    * `https://www.googleapis.com/auth/spreadsheets`
    * `openid`
    * `email`
    * `profile`
  </Step>

  <Step title="Connect via the widget">
    The end user opens the Connect widget, picks Google Sheets, and is sent through the OAuth consent screen.
  </Step>
</Steps>

## Usage

### Through the chat endpoint (recommended)

```bash theme={null}
# Read a range of cells
curl -N -X POST "https://api.routemcp.io/api/v1/mcp/<workspace_id>/chat" \
  -H "x-api-key: sk_live_your_key" \
  -H "x-session-id: user-42" \
  -H "content-type: application/json" \
  -d '{"message": "Read range A1:C10 from my Q3 Budget spreadsheet."}'

# Append a row
curl -N -X POST "https://api.routemcp.io/api/v1/mcp/<workspace_id>/chat" \
  -H "x-api-key: sk_live_your_key" \
  -H "x-session-id: user-42" \
  -H "content-type: application/json" \
  -d '{"message": "Append a row with Acme, 4200, 2026-07 to the Sales tab."}'
```

### Direct MCP JSON-RPC (Claude Desktop / Cursor / custom MCP clients)

```json theme={null}
{
  "mcpServers": {
    "routemcp": {
      "url": "https://api.routemcp.io/api/v1/mcp/<workspace_id>",
      "headers": {
        "x-api-key": "<YOUR_API_KEY>",
        "x-session-id": "<SESSION_ID>"
      }
    }
  }
}
```

Once connected, MCP clients can invoke any of the 48 tools by slug via the standard `tools/call` JSON-RPC method.
