> ## 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 Docs

> Google Docs API v1 — create documents and apply programmatic edits: insert/replace text, tables, headers, footers, bullets, images, styles, footnotes, and named ranges. 29 tools accessible through the MCP runtime endpoint.

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

## Overview

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

## Supported tools

All 29 slugs surfaced through MCP:

| Area      | Slugs                                                                                                                                                                                                                                                                      |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Documents | `GOOGLE_DOCS_CREATE_DOCUMENT`, `GOOGLE_DOCS_GET_DOCUMENT_BY_ID`, `GOOGLE_DOCS_UPDATE_EXISTING_DOCUMENT`                                                                                                                                                                    |
| Text      | `GOOGLE_DOCS_INSERT_TEXT`, `GOOGLE_DOCS_REPLACE_ALL_TEXT`, `GOOGLE_DOCS_DELETE_CONTENT_RANGE`, `GOOGLE_DOCS_UPDATE_TEXT_STYLE`, `GOOGLE_DOCS_UPDATE_PARAGRAPH_STYLE`, `GOOGLE_DOCS_UPDATE_DOCUMENT_STYLE`                                                                  |
| Lists     | `GOOGLE_DOCS_CREATE_PARAGRAPH_BULLETS`, `GOOGLE_DOCS_DELETE_PARAGRAPH_BULLETS`                                                                                                                                                                                             |
| Structure | `GOOGLE_DOCS_INSERT_PAGE_BREAK`, `GOOGLE_DOCS_CREATE_HEADER`, `GOOGLE_DOCS_DELETE_HEADER`, `GOOGLE_DOCS_CREATE_FOOTER`, `GOOGLE_DOCS_DELETE_FOOTER`, `GOOGLE_DOCS_CREATE_FOOTNOTE`, `GOOGLE_DOCS_CREATE_NAMED_RANGE`, `GOOGLE_DOCS_DELETE_NAMED_RANGE`                     |
| Tables    | `GOOGLE_DOCS_INSERT_TABLE`, `GOOGLE_DOCS_INSERT_TABLE_ROW`, `GOOGLE_DOCS_INSERT_TABLE_COLUMN`, `GOOGLE_DOCS_DELETE_TABLE_ROW`, `GOOGLE_DOCS_DELETE_TABLE_COLUMN`, `GOOGLE_DOCS_MERGE_TABLE_CELLS`, `GOOGLE_DOCS_UNMERGE_TABLE_CELLS`, `GOOGLE_DOCS_UPDATE_TABLE_ROW_STYLE` |
| Images    | `GOOGLE_DOCS_INSERT_INLINE_IMAGE`, `GOOGLE_DOCS_REPLACE_IMAGE`                                                                                                                                                                                                             |

## Connect setup

Google Docs uses Google's OAuth 2.0 with PKCE. You need a Google Cloud project with the **Google Docs 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 Docs API">
    In **APIs & Services → Library**, search for **Google Docs 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/documents`
    * `openid`
    * `email`
    * `profile`
  </Step>

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

## Usage

### Through the chat endpoint (recommended)

```bash theme={null}
# Create a new Google Doc and add a title heading
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": "Create a Google Doc titled Q3 Report and insert the heading Executive Summary at the top."}'

# Find-and-replace across a document
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": "In my Q3 Report doc, replace every 2024 with 2025."}'
```

### 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 29 tools by slug via the standard `tools/call` JSON-RPC method.
