# Google Docs Connector

## Links

- Product page URL: https://www.agentpmt.com/marketplace/google-docs-connector
- Product markdown URL: https://www.agentpmt.com/marketplace/google-docs-connector?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/google-docs-connector?format=agent-json

## Overview

- Product ID: 6962fd6f4cf4309309cac7b0
- Type: connector
- Unit type: request
- Price: 500 credits
- Categories: Content Management & Publishing, Team Collaboration & Workspaces, Document Processing & OCR
- Generated at: 2026-08-28T23:51:16.776Z

### Page Description

Comprehensive Google Docs management tool enabling AI agents to create edit format and share documents through OAuth authentication. Supports rich text formatting with bold italic underline strikethrough and custom fonts paragraph styling with alignment spacing and indentation table creation and manipulation image insertion from URLs headers footers and page breaks named ranges for bookmarking document export to multiple formats including PDF DOCX HTML and EPUB sharing and permission management and natural language document creation. Perfect for document automation report generation collaborative editing template creation and content management workflows.

### Agent Description

Google Docs: create, edit, format documents. Tables, images, headers, page breaks. Export to PDF/DOCX/HTML. Share and manage permissions.

## Details

### Details

Comprehensive Google Docs management tool enabling AI agents to create edit format and share documents through OAuth authentication. Supports rich text formatting with bold italic underline strikethrough and custom fonts paragraph styling with alignment spacing and indentation table creation and manipulation image insertion from URLs headers footers and page breaks named ranges for bookmarking document export to multiple formats including PDF DOCX HTML and EPUB sharing and permission management and natural language document creation. Perfect for document automation report generation collaborative editing template creation and content management workflows.

### Actions

- `create_document` (5 credits): Create a new Google Doc.
- `get_document` (5 credits): Retrieve content and indexed structure from every document tab, including nested child tabs.
- `search_documents` (5 credits): Search for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.
- `batch_update` (5 credits): Execute raw Google Docs API batch update requests. Put tabId inside each raw range or location when targeting a non-first tab.
- `insert_text` (5 credits): Insert text at a specific character position in a document.
- `replace_text` (5 credits): Find and replace text in one tab, or in all tabs when tab_id is omitted.
- `format_text` (5 credits): Apply text and/or paragraph styling to a zero-based UTF-16 range in a specific document tab. Provide at least one non-empty style object.
- `insert_image` (5 credits): Insert an inline image from a publicly accessible URL.
- `create_table` (5 credits): Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it.
- `insert_page_break` (5 credits): Insert a page break at a specific position.
- `insert_section_break` (5 credits): Insert a section break at a specific position.
- `create_header` (5 credits): Add a header to the document.
- `create_footer` (5 credits): Add a footer to the document.
- `update_style` (5 credits): Alias for format_text. Apply text and/or paragraph styling to a zero-based UTF-16 range in a specific tab.
- `create_named_range` (5 credits): Create a named range (bookmark) spanning a character range in the document.
- `export_document` (5 credits): Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content.
- `share_document` (5 credits): Set sharing permissions on a document via Google Drive.
- `get_permissions` (5 credits): List the current sharing permissions on a document.
- `quick_create` (5 credits): Create a document from a natural language description. If the text contains 'titled "..."' or 'called "..."', the title is extracted automatically.

### Use Cases

document automation, report generation, template creation, collaborative editing, content management, proposal writing, meeting agenda creation, contract generation, documentation workflows, batch document processing

### Workflows Using This Tool

#### Narrated Walkthrough to a Numbered SOP Document

Turns talking through a job out loud into a written, numbered standard operating procedure. Built for the people who actually know the equipment and have no time to write documentation: maintenance and facilities teams, field service, manufacturing, labs, franchise operations, and any owner trying to get a process out of their own head before handing it over. Walk the machine or the task and narrate it, saying the step number out loud as you go, and the workflow pulls the transcript of each new Plaud recording and turns it into a clean procedure document: a title, the equipment or process it covers, tools and safety notes gathered into their own sections, then numbered steps in the order you said them, with your asides and warnings kept attached to the step they belong to. Filler, false starts and interruptions are dropped; the technical content is left in your words rather than rewritten into corporate documentation voice. It lands as a Google Doc so it stays editable and exports to PDF or Word, and anything the narration left ambiguous is flagged at the end for you to fill in rather than being invented. Say each step number aloud and the transcript carries its own index, which makes pairing photos to steps afterwards mechanical instead of guesswork.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/narrated-walkthrough-to-a-numbered-sop-document
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/narrated-walkthrough-to-a-numbered-sop-document?format=agent-md
- Published: 2026-07-26T00:01:54.152Z

#### One Plaud Recording, Several Differently Formatted Summaries

Gets you past the one-template-per-recording ceiling. The Plaud app applies a single AutoFlow template to a recording, so if you want a short recap for yourself, a decisions-only version for the people who missed it, and a clean action list for your task manager, you are re-running or rewriting by hand. This workflow reads the transcript once and produces every format you have defined in a single pass: you list the output formats you want in a Google Sheet, each with a name and a description of the shape and audience, and the workflow generates all of them from the same source text and writes them into one Google Doc per recording with a section for each. Because every version comes from the same read of the transcript, they stay consistent with each other rather than drifting the way separately generated summaries do. Formats are yours to change at any time by editing the sheet, with no re-recording and no template juggling in the app. A processed log keeps each recording to a single pass so it can run on a schedule over everything new.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/one-plaud-recording-several-differently-formatted-summaries
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/one-plaud-recording-several-differently-formatted-summaries?format=agent-md
- Published: 2026-07-26T00:01:46.081Z

#### Plaud Transcripts Corrected With Your Own Terminology Glossary

Fixes the words your transcription keeps getting wrong, by giving the pipeline your vocabulary instead of hoping a bigger model guesses right. Every speech model mangles terms it has never seen: cell line and reagent names, drug and device names, case and matter numbers, part numbers, local spelling and number conventions, team and client names. Swapping to a different model does not fix this, because none of them have your terms either. Keep a plain Google Sheet glossary of the terms that matter, each with the spelling you want and the misfires it usually comes back as ("HEK293" for "heck two ninety three"), plus any formatting rules you need enforced, such as Swiss German ss instead of eszett or 1'000.00 number style. On each run the workflow reads the glossary, pulls the transcript of every new Plaud recording, applies the corrections to the transcript first, and only then writes the summary and action items from the corrected text, so your terminology is right everywhere downstream instead of only in the raw transcript. The corrected transcript and summary land in a Google Doc, and every correction made is listed so you can see what changed and keep tuning the glossary. Unknown terms are flagged, never silently normalized into something that looks plausible.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/plaud-transcripts-corrected-with-your-own-terminology-glossary
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/plaud-transcripts-corrected-with-your-own-terminology-glossary?format=agent-md
- Published: 2026-07-26T00:01:37.863Z

#### Human-Voice AI Blog Writer: Research, Write, and Illustrate SEO Articles from Your Content Calendar

Turn a topic or a content-calendar spreadsheet into a publish-ready, fact-checked blog article written in a natural human voice. This AI blog writing workflow picks the next due topic from your Google Sheet (or takes one directly), researches it across live news and authoritative web sources, builds a sourced fact sheet and SEO outline, then drafts the full long-form article with a human-style writing agent that writes only from verified facts. Every draft runs through an automated writing quality check that catches robotic, banned AI phrases and rewrites them until the copy passes. A custom hero image is generated to match the story, the finished article is assembled into a formatted Google Doc with a sources section, the run is logged back to your content calendar, and the doc link lands in your inbox. Ideal for content marketing teams, SEO agencies, founders, newsletters, and solo bloggers who want an AI blog post generator and content automation pipeline that delivers consistent, on-brand, long-form SEO content without the research grind or the telltale AI voice.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/human-voice-blog-factory-research-write-illustrate-and-deliver-seo-articles-from-your-content-calendar
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/human-voice-blog-factory-research-write-illustrate-and-deliver-seo-articles-from-your-content-calendar?format=agent-md
- Published: 2026-06-10T20:59:39.285Z

#### Pipedrive Field Sales Route Planner: Optimized In-Person Visit Itineraries with Maps & Talking Points

Plan a high-impact day of in-person sales visits straight from your CRM. Give this AI workflow a city or area and it pulls every relevant Pipedrive contact and open deal there, optimizes the most efficient driving route across the stops, and generates a map plus a timed itinerary with arrival windows. For each visit it briefs the rep with last activity, open-deal status, and specific talking points drawn from the contact's notes, and can pre-plan a small gift to bring. The finished plan is delivered as a shareable document with calendar events for every stop. Perfect for field sales, account-based selling, territory planning, customer check-ins, QBR tours, and outside sales reps who want CRM-driven, route-optimized visit planning Pipedrive doesn't offer.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/pipedrive-field-sales-route-planner-optimized-in-person-visit-itineraries-with-maps-talking-points
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/pipedrive-field-sales-route-planner-optimized-in-person-visit-itineraries-with-maps-talking-points?format=agent-md
- Published: 2026-06-10T02:47:37.923Z

#### GitHub Dev Announcements

Generate user-facing development update announcements from recent GitHub commits across one or more repositories. The user supplies a list of repos on the first run (wildcards like `org/*` allowed); the workflow stores them in a Google Sheet so subsequent runs need no input. For each run, the agent fetches commits since the last run (or last 7 days on first run), categorizes them into New Features / Updates / Bug Fixes, applies a security filter to strip internal paths, endpoints, secrets, and vulnerability details, drafts the announcement in a Google Doc, polishes the writing with a quality check tool, and logs the run (date, repos, commit count, doc URL, status) back in the sheet. Designed as a starting template — users can remix it to add their own follow-up steps such as posting to Slack or emailing subscribers.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/github-dev-announcements
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/github-dev-announcements?format=agent-md
- Published: 2026-04-30T17:43:08.504Z

#### Gluten-Free Dinner Recipes to Kroger Cart

Generates 5 gluten-free dinner recipes, saves all recipes with full instructions to a Google Doc, extracts and deduplicates the combined ingredient list, then searches Kroger for all ingredients in a single batch using the gluten-free allergen filter and adds everything to your cart. Notifies you when complete with a link to the Google Doc and confirmation that your cart is ready.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/gluten-free-dinner-recipes-to-kroger-cart
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/gluten-free-dinner-recipes-to-kroger-cart?format=agent-md
- Published: 2026-03-04T00:10:45.589Z

#### Kroger Grocery Auto-Order from Google Doc

Reads your Google Doc named grocery list, searches Kroger for each item to find the best-priced match, adds them to your Kroger cart, checks off completed items in the Google Doc, then sends you a notification that your order is ready.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/kroger-grocery-auto-order-from-google-doc
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/kroger-grocery-auto-order-from-google-doc?format=agent-md
- Published: 2026-02-23T02:15:24.258Z

#### Rental Property Cash Flow Analyzer

Analyzes rental property investment viability by calculating mortgage payments, computing net operating income and cash-on-cash returns, projecting cash flows, generating return visualizations, creating a comprehensive investment analysis report, and delivering it to the investor. Essential for real estate investors evaluating rental property acquisitions.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/rental-property-cash-flow-analyzer
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/rental-property-cash-flow-analyzer?format=agent-md
- Published: 2026-02-18T16:43:43.406Z

### Related Content

#### Claude Transcript - Allergen Friendly Grocery Shopping With AI

- Type: video
- Page URL: https://www.agentpmt.com/videos/claude-transcript-allergen-friendly-grocery-shopping-with-ai
- Markdown URL: Not available for this content type
Full Claude Code transcript showing an AI agent executing the Gluten-Free Dinner Recipes to Kroger Cart workflow -- generating recipes, saving to Google Docs, searching Kroger, and adding 41 items to the cart.

#### AI Grocery Shopping is HERE -- Gluten-Free Recipes to Kroger Cart in Minutes

- Type: video
- Page URL: https://www.agentpmt.com/videos/ai-grocery-shopping-is-here-gluten-free-recipes-to-kroger-cart-in-minutes
- Markdown URL: Not available for this content type
Watch an AI agent generate 5 gluten-free dinner recipes, save them to Google Docs, search Kroger for all ingredients, and add 41 items to a Kroger cart -- all autonomously using AgentPMT workflow skills.

## Documentation

No platform documentation is currently linked to this product.

## Integration Details

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp#platform=claude
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp#platform=chatgpt
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp#platform=cursor
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp#platform=windsurf

Use the local router for command-based MCP clients. It forwards requests to `https://api.agentpmt.com/mcp` and does not execute tools locally.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "6962fd6f4cf4309309cac7b0",
    "parameters": {
      "action": "create_document",
      "title": "example_title"
    }
  }'
```

### Autonomous Agents

Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.

- Autonomous Agent API reference URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents
- Autonomous Agent API reference markdown URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents?format=agent-md
- Credit-Based Access Using AgentAddress: https://www.agentpmt.com/docs/autonomous-agents/credit-based-tool-usage-with-agentaddress
- AgentAddress is preferred for persistent file access, stored platform state, and maximum tool use ability across repeated calls.
- Direct x402 is for independent one-off tool calls that do not require shared files or stored platform state.
- Direct x402 public payments: USDC on Base, Arbitrum, Optimism, Polygon, and Avalanche.

#### Product Skill Package

This product has a published Agent Skill package for product-specific operating instructions.

- Skill slug: google-docs-connector
- Version: 1.0.1
- Download SKILL.md: https://raw.githubusercontent.com/AgentPMT/agent-skills/main/skills/google-docs-connector/SKILL.md
- Package source: https://github.com/AgentPMT/agent-skills/tree/main/skills/google-docs-connector
- OpenClaw listing: https://clawhub.ai/agentpmt/google-docs-connector
- OpenClaw install: `openclaw skills install google-docs-connector`
- skills.sh install: `npx skills add AgentPMT/agent-skills --skill google-docs-connector`
- Last published: 2026-08-05T02:13:22.779Z

### Schema

#### Credentials

These runtime credentials should be provided under `parameters._credentials` when required.

- Google OAuth (`google_oauth`, oauth_token, required)
  Help: Connect your Google account.
  Connection ID: 69616abea90ed54743f01957

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "create_document": {
      "description": "Create a new Google Doc.",
      "properties": {
        "title": {
          "type": "string",
          "description": "Document title.",
          "required": true
        },
        "text": {
          "type": "string",
          "description": "Initial body content for the document.",
          "required": false
        }
      }
    },
    "get_document": {
      "description": "Retrieve content and indexed structure from every document tab, including nested child tabs.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID (from the document URL).",
          "required": true
        }
      }
    },
    "search_documents": {
      "description": "Search for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.",
      "properties": {
        "query": {
          "type": "string",
          "description": "Search term that matches document names (contains match).",
          "required": false
        },
        "max_results": {
          "type": "integer",
          "description": "Maximum results to return (1-100).",
          "required": false,
          "default": 20,
          "minimum": 1,
          "maximum": 100
        }
      }
    },
    "batch_update": {
      "description": "Execute raw Google Docs API batch update requests. Put tabId inside each raw range or location when targeting a non-first tab.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "requests": {
          "type": "array",
          "description": "Array of raw Google Docs API request objects.",
          "required": true,
          "items": {
            "type": "object"
          }
        }
      }
    },
    "insert_text": {
      "description": "Insert text at a specific character position in a document.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "text": {
          "type": "string",
          "description": "Text content to insert.",
          "required": true
        },
        "location": {
          "type": "integer",
          "description": "Zero-based UTF-16 code-unit index. Defaults to 1, normally the beginning of a tab body.",
          "required": false,
          "minimum": 0
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "replace_text": {
      "description": "Find and replace text in one tab, or in all tabs when tab_id is omitted.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "search_text": {
          "type": "string",
          "description": "Text to search for.",
          "required": true
        },
        "replace_with": {
          "type": "string",
          "description": "Replacement text.",
          "required": true
        },
        "match_case": {
          "type": "boolean",
          "description": "Whether to use case-sensitive search.",
          "required": false,
          "default": false
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, replacement applies to all tabs.",
          "required": false
        }
      }
    },
    "format_text": {
      "description": "Apply text and/or paragraph styling to a zero-based UTF-16 range in a specific document tab. Provide at least one non-empty style object.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "range_start": {
          "type": "integer",
          "description": "Zero-based inclusive UTF-16 code-unit start index.",
          "required": true,
          "minimum": 0
        },
        "range_end": {
          "type": "integer",
          "description": "Zero-based exclusive UTF-16 code-unit end index.",
          "required": true,
          "minimum": 0
        },
        "text_style": {
          "type": "object",
          "description": "Text styling options.",
          "required": false,
          "properties": {
            "bold": {
              "type": "boolean",
              "description": "Apply bold formatting.",
              "required": false
            },
            "italic": {
              "type": "boolean",
              "description": "Apply italic formatting.",
              "required": false
            },
            "underline": {
              "type": "boolean",
              "description": "Apply underline formatting.",
              "required": false
            },
            "strikethrough": {
              "type": "boolean",
              "description": "Apply strikethrough formatting.",
              "required": false
            },
            "font_family": {
              "type": "string",
              "description": "Font family name (e.g., 'Arial', 'Times New Roman').",
              "required": false
            },
            "font_size": {
              "type": "object",
              "description": "Font size with magnitude and unit.",
              "required": false,
              "properties": {
                "magnitude": {
                  "type": "number",
                  "description": "Size value.",
                  "required": true
                },
                "unit": {
                  "type": "string",
                  "description": "Size unit (typically 'PT').",
                  "required": true
                }
              }
            },
            "foreground_color": {
              "type": "object",
              "description": "Text color as RGB values (0-1).",
              "required": false
            },
            "background_color": {
              "type": "object",
              "description": "Text highlight color as RGB values (0-1).",
              "required": false
            },
            "link": {
              "type": "string",
              "description": "URL to create a hyperlink.",
              "required": false
            }
          }
        },
        "paragraph_style": {
          "type": "object",
          "description": "Paragraph styling options, including real Google Docs named heading styles.",
          "required": false,
          "properties": {
            "alignment": {
              "type": "string",
              "description": "Text alignment.",
              "required": false,
              "enum": [
                "START",
                "CENTER",
                "END",
                "JUSTIFIED"
              ]
            },
            "line_spacing": {
              "type": "number",
              "description": "Line spacing (100=single, 150=1.5x, 200=double).",
              "required": false
            },
            "indent_start": {
              "type": "object",
              "description": "Left indent with magnitude and unit.",
              "required": false
            },
            "indent_end": {
              "type": "object",
              "description": "Right indent with magnitude and unit.",
              "required": false
            },
            "indent_first_line": {
              "type": "object",
              "description": "First line indent with magnitude and unit.",
              "required": false
            },
            "named_style_type": {
              "type": "string",
              "description": "Google Docs named paragraph style.",
              "required": false,
              "enum": [
                "NORMAL_TEXT",
                "TITLE",
                "SUBTITLE",
                "HEADING_1",
                "HEADING_2",
                "HEADING_3",
                "HEADING_4",
                "HEADING_5",
                "HEADING_6"
              ]
            },
            "spacing_mode": {
              "type": "string",
              "description": "Paragraph spacing mode.",
              "required": false,
              "enum": [
                "NEVER_COLLAPSE",
                "COLLAPSE_LISTS"
              ]
            }
          }
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "insert_image": {
      "description": "Insert an inline image from a publicly accessible URL.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "image_url": {
          "type": "string",
          "description": "Publicly accessible URL of the image to insert.",
          "required": true
        },
        "location": {
          "type": "integer",
          "description": "Zero-based UTF-16 code-unit index. Defaults to 1, normally the beginning of a tab body.",
          "required": false,
          "minimum": 0
        },
        "width": {
          "type": "integer",
          "description": "Image width in pixels.",
          "required": false,
          "minimum": 1
        },
        "height": {
          "type": "integer",
          "description": "Image height in pixels.",
          "required": false,
          "minimum": 1
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "create_table": {
      "description": "Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "rows": {
          "type": "integer",
          "description": "Number of table rows (1-100). Not needed if table_data is provided.",
          "required": false,
          "minimum": 1,
          "maximum": 100
        },
        "columns": {
          "type": "integer",
          "description": "Number of table columns (1-20). Not needed if table_data is provided.",
          "required": false,
          "minimum": 1,
          "maximum": 20
        },
        "table_data": {
          "type": "array",
          "description": "2D array of strings representing table cell data.",
          "required": false,
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "location": {
          "type": "integer",
          "description": "Zero-based UTF-16 code-unit index. Defaults to 1, normally the beginning of a tab body.",
          "required": false,
          "minimum": 0
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "insert_page_break": {
      "description": "Insert a page break at a specific position.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "location": {
          "type": "integer",
          "description": "Zero-based UTF-16 code-unit index. Defaults to 1, normally the beginning of a tab body.",
          "required": false,
          "minimum": 0
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "insert_section_break": {
      "description": "Insert a section break at a specific position.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "location": {
          "type": "integer",
          "description": "Zero-based UTF-16 code-unit index. Defaults to 1, normally the beginning of a tab body.",
          "required": false,
          "minimum": 0
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "create_header": {
      "description": "Add a header to the document.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "header_type": {
          "type": "string",
          "description": "Header type to create.",
          "required": false,
          "default": "DEFAULT",
          "enum": [
            "DEFAULT",
            "FIRST_PAGE",
            "EVEN_PAGE",
            "ODD_PAGE"
          ]
        },
        "text": {
          "type": "string",
          "description": "Header text content.",
          "required": false
        }
      }
    },
    "create_footer": {
      "description": "Add a footer to the document.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "footer_type": {
          "type": "string",
          "description": "Footer type to create.",
          "required": false,
          "default": "DEFAULT",
          "enum": [
            "DEFAULT",
            "FIRST_PAGE",
            "EVEN_PAGE",
            "ODD_PAGE"
          ]
        }
      }
    },
    "update_style": {
      "description": "Alias for format_text. Apply text and/or paragraph styling to a zero-based UTF-16 range in a specific tab.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "range_start": {
          "type": "integer",
          "description": "Zero-based inclusive UTF-16 code-unit start index.",
          "required": true,
          "minimum": 0
        },
        "range_end": {
          "type": "integer",
          "description": "Zero-based exclusive UTF-16 code-unit end index.",
          "required": true,
          "minimum": 0
        },
        "text_style": {
          "type": "object",
          "description": "Text styling options.",
          "required": false,
          "properties": {
            "bold": {
              "type": "boolean",
              "description": "Apply bold formatting.",
              "required": false
            },
            "italic": {
              "type": "boolean",
              "description": "Apply italic formatting.",
              "required": false
            },
            "underline": {
              "type": "boolean",
              "description": "Apply underline formatting.",
              "required": false
            },
            "strikethrough": {
              "type": "boolean",
              "description": "Apply strikethrough formatting.",
              "required": false
            },
            "font_family": {
              "type": "string",
              "description": "Font family name (e.g., 'Arial', 'Times New Roman').",
              "required": false
            },
            "font_size": {
              "type": "object",
              "description": "Font size with magnitude and unit.",
              "required": false,
              "properties": {
                "magnitude": {
                  "type": "number",
                  "description": "Size value.",
                  "required": true
                },
                "unit": {
                  "type": "string",
                  "description": "Size unit (typically 'PT').",
                  "required": true
                }
              }
            },
            "foreground_color": {
              "type": "object",
              "description": "Text color as RGB values (0-1).",
              "required": false
            },
            "background_color": {
              "type": "object",
              "description": "Text highlight color as RGB values (0-1).",
              "required": false
            },
            "link": {
              "type": "string",
              "description": "URL to create a hyperlink.",
              "required": false
            }
          }
        },
        "paragraph_style": {
          "type": "object",
          "description": "Paragraph styling options, including real Google Docs named heading styles.",
          "required": false,
          "properties": {
            "alignment": {
              "type": "string",
              "description": "Text alignment.",
              "required": false,
              "enum": [
                "START",
                "CENTER",
                "END",
                "JUSTIFIED"
              ]
            },
            "line_spacing": {
              "type": "number",
              "description": "Line spacing (100=single, 150=1.5x, 200=double).",
              "required": false
            },
            "indent_start": {
              "type": "object",
              "description": "Left indent with magnitude and unit.",
              "required": false
            },
            "indent_end": {
              "type": "object",
              "description": "Right indent with magnitude and unit.",
              "required": false
            },
            "indent_first_line": {
              "type": "object",
              "description": "First line indent with magnitude and unit.",
              "required": false
            },
            "named_style_type": {
              "type": "string",
              "description": "Google Docs named paragraph style.",
              "required": false,
              "enum": [
                "NORMAL_TEXT",
                "TITLE",
                "SUBTITLE",
                "HEADING_1",
                "HEADING_2",
                "HEADING_3",
                "HEADING_4",
                "HEADING_5",
                "HEADING_6"
              ]
            },
            "spacing_mode": {
              "type": "string",
              "description": "Paragraph spacing mode.",
              "required": false,
              "enum": [
                "NEVER_COLLAPSE",
                "COLLAPSE_LISTS"
              ]
            }
          }
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "create_named_range": {
      "description": "Create a named range (bookmark) spanning a character range in the document.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "range_name": {
          "type": "string",
          "description": "Name for the named range/bookmark.",
          "required": true
        },
        "range_start": {
          "type": "integer",
          "description": "Zero-based inclusive UTF-16 code-unit start index.",
          "required": true,
          "minimum": 0
        },
        "range_end": {
          "type": "integer",
          "description": "Zero-based exclusive UTF-16 code-unit end index.",
          "required": true,
          "minimum": 0
        },
        "tab_id": {
          "type": "string",
          "description": "Target Google Docs tab ID from get_document tabs[].tab_id. If omitted, this indexed update targets the first tab.",
          "required": false
        }
      }
    },
    "export_document": {
      "description": "Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "export_format": {
          "type": "string",
          "description": "Target export format.",
          "required": true,
          "enum": [
            "pdf",
            "docx",
            "odt",
            "rtf",
            "txt",
            "html",
            "epub",
            "zip"
          ]
        }
      }
    },
    "share_document": {
      "description": "Set sharing permissions on a document via Google Drive.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        },
        "share_with": {
          "type": "array",
          "description": "List of permission objects defining who to share with.",
          "required": true,
          "items": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "description": "Email address (for user or group permissions).",
                "required": false
              },
              "role": {
                "type": "string",
                "description": "Permission level.",
                "required": true,
                "enum": [
                  "reader",
                  "writer",
                  "commenter"
                ]
              },
              "permission_type": {
                "type": "string",
                "description": "Permission type.",
                "required": true,
                "enum": [
                  "user",
                  "group",
                  "domain",
                  "anyone"
                ]
              },
              "domain": {
                "type": "string",
                "description": "Domain for domain-wide sharing.",
                "required": false
              }
            }
          }
        },
        "send_notification": {
          "type": "boolean",
          "description": "Send email notification when sharing.",
          "required": false,
          "default": true
        },
        "email_message": {
          "type": "string",
          "description": "Custom message for the sharing notification email.",
          "required": false
        }
      }
    },
    "get_permissions": {
      "description": "List the current sharing permissions on a document.",
      "properties": {
        "document_id": {
          "type": "string",
          "description": "Google Docs document ID.",
          "required": true
        }
      }
    },
    "quick_create": {
      "description": "Create a document from a natural language description. If the text contains 'titled \"...\"' or 'called \"...\"', the title is extracted automatically.",
      "properties": {
        "text": {
          "type": "string",
          "description": "Natural language description or content for the document.",
          "required": true
        },
        "title": {
          "type": "string",
          "description": "Document title. If omitted, may be extracted from the text description.",
          "required": false
        }
      }
    }
  }
}
```

### Usage Instructions

# Google Docs

Create, edit, format, and share Google Docs. Search for documents by name.

## Parameters

- `action` (string, required): Action to perform. Use get_instructions for full details.
- `document_id` (string): Google Docs document ID (from the document URL). Required for most actions except create_document, search_documents, quick_create.
- `tab_id` (string): Target tab for tab-scoped updates. Get this from `get_document` → `tabs[].tab_id`. Indexed updates default to the first tab when omitted. `replace_text` applies to all tabs when omitted.
- `title` (string): Document title. Required for: create_document
- `query` (string): Search term for search_documents. Matches document names (contains match).
- `max_results` (integer, default 20, range 1-100): Maximum results for search_documents
- `text` (string): Text content for insert_text, create_document (initial content), replace_text, quick_create
- `location` (integer): Zero-based UTF-16 code-unit index for insertions. Defaults to `1`, normally the beginning of a tab body.
- `range_start` (integer): Zero-based, inclusive UTF-16 code-unit start index for format_text and create_named_range.
- `range_end` (integer): Zero-based, exclusive UTF-16 code-unit end index for format_text and create_named_range.
- `search_text` (string): Text to find. Required for: replace_text
- `replace_with` (string): Replacement text. Required for: replace_text
- `match_case` (boolean, default false): Case-sensitive search for replace_text
- `requests` (array of objects): Raw batch update requests for batch_update
- `text_style` (object): Styling: bold, italic, underline, strikethrough, font_family, font_size, foreground_color, background_color, link
- `paragraph_style` (object): Styling: named_style_type (NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1 through HEADING_6), alignment (START/CENTER/END/JUSTIFIED), line_spacing (100/150/200), indents
- `rows` (integer, 1-100): Table rows for create_table
- `columns` (integer, 1-20): Table columns for create_table
- `table_data` (array of arrays): 2D string array of cell data for create_table
- `image_url` (string): Publicly accessible image URL for insert_image
- `width` (integer): Image width in pixels
- `height` (integer): Image height in pixels
- `export_format` (string): One of: pdf, docx, odt, rtf, txt, html, epub, zip
- `share_with` (array of objects): Each with `email`, `role` (reader/writer/commenter), `type` (user/group/domain/anyone)
- `send_notification` (boolean, default true): Send email when sharing
- `email_message` (string): Custom sharing notification message

## Actions

### `get_instructions`
Returns this documentation.

### `create_document`
Creates a new Google Doc.

Required: `title`
Optional: `text` (initial content)

### `get_document`
Retrieves content and indexed structure from every document tab, including nested child tabs.

Required: `document_id`

The response includes a flattened `tabs` array in UI order. Each item contains `tab_id`, title/hierarchy metadata, extracted `text_content`, and the complete `document_tab` structure with Google-provided `startIndex` and `endIndex` values. Use those returned indices and the matching `tab_id` for subsequent updates.

Indices are zero-based UTF-16 code-unit offsets; `startIndex` is inclusive and `endIndex` is exclusive. Refetch the document after edits that can shift indices.

### `search_documents`
Searches for Google Docs by name. Returns documents sorted by most recently modified.

Optional: `query` (name contains match), `max_results`

If `query` is omitted, lists recent Google Docs.

### `insert_text`
Inserts text at a specific position.

Required: `document_id`, `text`
Optional: `location` (default: 1), `tab_id`

### `replace_text`
Finds and replaces all occurrences of text.

Required: `document_id`, `search_text`, `replace_with`
Optional: `match_case`, `tab_id`. If `tab_id` is omitted, replacement applies to all tabs.

### `format_text`
Applies text and paragraph styling to a range.

Required: `document_id`, `range_start`, `range_end`, and at least one of `text_style` or `paragraph_style`
Optional: `tab_id`

### `update_style`
Alias for format_text.

### `insert_image`
Inserts an inline image.

Required: `document_id`, `image_url`
Optional: `location`, `width`, `height`, `tab_id`

### `create_table`
Inserts a table, optionally populated with data.

Required: `document_id`
Optional: `rows`, `columns`, `table_data`, `location`, `tab_id`

If `table_data` is provided, dimensions are inferred from it.

### `insert_page_break`
Required: `document_id`
Optional: `location`, `tab_id`

### `insert_section_break`
Required: `document_id`
Optional: `location`, `tab_id`

### `create_header`
Required: `document_id`
Optional: `header_type` (DEFAULT, FIRST_PAGE, EVEN_PAGE, ODD_PAGE), `text`

### `create_footer`
Required: `document_id`
Optional: `footer_type` (DEFAULT, FIRST_PAGE, EVEN_PAGE, ODD_PAGE)

### `create_named_range`
Required: `document_id`, `range_name`, `range_start`, `range_end`
Optional: `tab_id`

### `export_document`
Exports to another format. Text formats return content directly; binary formats return base64.

Required: `document_id`, `export_format`

### `share_document`
Sets sharing permissions via Google Drive.

Required: `document_id`, `share_with`
Optional: `send_notification`, `email_message`

### `get_permissions`
Lists current sharing settings.

Required: `document_id`

### `batch_update`
Executes raw Google Docs API batch update requests for advanced operations.

Required: `document_id`, `requests`

For a request containing a `range` or `location`, put `tabId` inside that raw range/location. The top-level `tab_id` parameter is not injected into raw requests.

### `quick_create`
Creates a document from a natural language description.

Required: `text`
Optional: `title`

## Examples

```json
{"action":"search_documents","query":"meeting notes"}
```

```json
{"action":"search_documents","query":"Q1 report","max_results":5}
```

```json
{"action":"create_document","title":"Meeting Notes","text":"Agenda:\n1. Review\n2. Planning"}
```

```json
{"action":"get_document","document_id":"1a2b3c4d5e"}
```

```json
{"action":"insert_text","document_id":"1a2b3c4d5e","tab_id":"t.abc123","text":"New paragraph\n","location":1}
```

```json
{"action":"replace_text","document_id":"1a2b3c4d5e","search_text":"draft","replace_with":"final"}
```

```json
{"action":"format_text","document_id":"1a2b3c4d5e","tab_id":"t.abc123","range_start":1,"range_end":10,"text_style":{"bold":true,"font_size":{"magnitude":14,"unit":"PT"}}}
```

Apply a real heading style in a specific tab:

```json
{"action":"format_text","document_id":"1a2b3c4d5e","tab_id":"t.abc123","range_start":1,"range_end":18,"paragraph_style":{"named_style_type":"HEADING_1"}}
```

Create a real numbered list in a specific tab using indices returned by `get_document`:

```json
{"action":"batch_update","document_id":"1a2b3c4d5e","requests":[{"createParagraphBullets":{"range":{"tabId":"t.abc123","startIndex":20,"endIndex":58},"bulletPreset":"NUMBERED_DECIMAL_ALPHA_ROMAN"}}]}
```

```json
{"action":"export_document","document_id":"1a2b3c4d5e","export_format":"pdf"}
```

```json
{"action":"share_document","document_id":"1a2b3c4d5e","share_with":[{"email":"user@example.com","role":"writer","type":"user"}]}
```

## Response

All responses return `{"success": true, "output": { ... }}`. Output varies by action:

- `search_documents` → `{"query": "...", "result_count": N, "documents": [{"document_id", "name", "modified_time", "web_view_link", ...}]}`
- `create_document` → `{"document_id", "title", "revision_id"}`
- `get_document` → `{"document_id", "title", "text_content", "word_count", "tab_count", "tabs", "index_semantics", "raw_document"}`
- `replace_text` → `{"occurrences_changed": N}`
- `export_document` → `{"content": "..."}` (text) or `{"content_base64": "..."}` (binary)
- `share_document` → `{"permissions_added": N, "permissions": [...]}`
- `get_permissions` → `{"permissions": [...]}`

### Frequently Asked Questions

#### How do I connect this tool to an external agent?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

#### How does an external agent use this tool?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:

> Use the AgentPMT-Tool-Search-and-Execution tool. First call action 'get\_instructions' so you know how to use the tool search interface. Then call action 'get\_schema' with tool\_id 6962fd6f4cf4309309cac7b0 ("Google Docs Connector"). After reading the schema and any returned instructions, tell me what this tool can do, we are going to be using it

The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

### Dependencies

This product has no public dependency products.