> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Google Docs

**Authentication:** OAuth. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Open the `Q2 Strategy` doc and summarize the section on pricing.
* Create a new doc in the `Engineering / RFCs` folder titled 'Auth migration' from this template.
* Find every doc in `Shared drives / Sales` last edited over 90 days ago.

## Available Tools

#### insert\_image

Insert an inline image at a specific location

#### create\_named\_range

Create a named range (bookmark) in a document

#### delete\_named\_range

Delete a named range from a document

#### create\_header

Create a header section at a section break in a document

#### delete\_header

Delete a header section from a document

#### create\_footer

Create a footer section at a section break in a document

#### delete\_footer

Delete a footer section from a document

#### create\_document

Create a new Google Docs document with optional title

#### get\_document

Retrieve a Google Docs document by ID

#### get\_document\_end\_index

Get the end index for appending content to a document

#### insert\_image\_in\_table\_cell

Insert an image into a table cell by table position

#### insert\_text\_in\_table\_cell

Insert text into a table cell by table position

#### create\_and\_populate\_table

Create and populate a table with data in one operation

#### batch\_update\_document

Apply multiple updates to a document in a single operation

#### insert\_text

Insert text at a specific location in a document

#### delete\_text

Delete text from a specified range in a document

#### replace\_text

Find and replace all occurrences of text in a document

#### format\_text

Apply text formatting to a range in a document

#### format\_paragraph

Apply paragraph formatting to a range in a document

#### append\_text

Append text to the end of a document

#### insert\_table

Insert a table with specified rows and columns

#### insert\_table\_row

Insert a new row into an existing table

#### insert\_table\_column

Insert a new column into an existing table

#### delete\_table\_row

Delete a row from an existing table

#### delete\_table\_column

Delete a column from an existing table

#### create\_footnote

Insert a footnote reference at the given index. The API creates a numbered reference and a corresponding footnote section at the page bottom; use inse…

#### create\_paragraph\_bullets

Apply bullet or numbered list formatting to all paragraphs that overlap a range. Use bullet\_preset to pick the list style.

#### create\_tab

Create a new tab in a Google Docs document

#### delete\_paragraph\_bullets

Remove bullet/numbered list formatting from all paragraphs that overlap a range. Paragraph text is preserved.

#### delete\_tab

Delete a tab from a Google Docs document by tab ID. Use list\_tabs to find tab IDs

#### insert\_section\_break

Insert a section break at a specific index. Use NEXT\_PAGE/EVEN\_PAGE/ODD\_PAGE to start a new page; CONTINUOUS to keep flow.

#### list\_tabs

List all tabs in a Google Docs document, including tab IDs and titles

#### merge\_table\_cells

Merge a rectangular block of table cells into one. Specify the upper-left and lower-right cell positions. Common in header rows and summary tables.

#### pin\_table\_header\_rows

Pin the first N rows of a table as headers that repeat at the top of every page break. Pass 0 to unpin all header rows.

#### replace\_named\_range\_content

Replace the content of a named range with new text. Named ranges auto-update their indices when surrounding content shifts, making them safer than rep…

#### unmerge\_table\_cells

Reverse a previous merge\_table\_cells operation, restoring the cells in the specified range to individual cells.

#### update\_document\_style

Set page margins, page size, or background color on the document. Provide only the fields you want to change.

#### update\_named\_style

Redefine a named style document-wide (HEADING\_1 through HEADING\_6, NORMAL\_TEXT, TITLE, SUBTITLE).

#### update\_section\_style

Update section style (columns, separator, content direction, margins) over a range.

#### update\_tab\_properties

Update a tab's properties (e.g. rename it) in a Google Docs document

#### update\_table\_cell\_style

Update visual styling on a single table cell - background color, borders, padding, vertical alignment.

#### update\_table\_column\_properties

Set width on one or more columns in a table. Use width\_type=FIXED\_WIDTH with width\_pt for explicit widths, or EVENLY\_DISTRIBUTED to mark the targeted…

#### update\_table\_row\_style

Set minimum row height and/or overflow prevention on one or more rows in a table. At least one of min\_row\_height\_pt or prevent\_overflow must be set.