AgentPMT
Google Docs Connector

Google Docs Connector

Connector

Available ActionsEach successful request consumes credits as outlined below.

create_document5crget_document5crsearch_documents5crbatch_update5crinsert_text5crreplace_text5crformat_text5crinsert_image5crcreate_table5crinsert_page_break5crinsert_section_break5crcreate_header5crcreate_footer5crupdate_style5crcreate_named_range5crexport_document5crshare_document5crget_permissions5crquick_create5cr

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.

Use Cases

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

Credentials

Google OAuth *
Connect your Google account.
oauth token

Manage credentials in your dashboard.

Actions(19)

create_document5cr2 params(1 required)

Create a new Google Doc.

Create a new Google Doc.

titlerequiredstring

Document title.

textstring

Initial body content for the document.

get_document5cr1 param(1 required)

Retrieve a document's full content, text, word count, and structure.

Retrieve a document's full content, text, word count, and structure.

document_idrequiredstring

Google Docs document ID (from the document URL).

search_documents5cr2 params

Search for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.

Search for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.

querystring

Search term that matches document names (contains match).

max_resultsinteger

Maximum results to return (1-100).

Default: 20
Range: 1 - 100
batch_update5cr2 params(2 required)

Execute raw Google Docs API batch update requests for advanced operations not covered by other actions.

Execute raw Google Docs API batch update requests for advanced operations not covered by other actions.

document_idrequiredstring

Google Docs document ID.

requestsrequiredarray

Array of raw Google Docs API request objects.

Array of: object
insert_text5cr3 params(2 required)

Insert text at a specific character position in a document.

Insert text at a specific character position in a document.

document_idrequiredstring

Google Docs document ID.

textrequiredstring

Text content to insert.

locationinteger

1-based character index for insertion. Defaults to 1 (beginning of document).

Range: 1 - ...
replace_text5cr4 params(3 required)

Find and replace all occurrences of text in a document.

Find and replace all occurrences of text in a document.

document_idrequiredstring

Google Docs document ID.

search_textrequiredstring

Text to search for.

replace_withrequiredstring

Replacement text.

match_caseboolean

Whether to use case-sensitive search.

Default: false
format_text5cr5 params(4 required)

Apply text and/or paragraph styling to a character range in a document.

Apply text and/or paragraph styling to a character range in a document.

document_idrequiredstring

Google Docs document ID.

range_startrequiredinteger

Start index of the range to format (1-based).

Range: 1 - ...
range_endrequiredinteger

End index of the range to format (1-based).

Range: 1 - ...
text_stylerequiredobject

Text styling options.

Properties:
bold(boolean)- Apply bold formatting.
italic(boolean)- Apply italic formatting.
underline(boolean)- Apply underline formatting.
strikethrough(boolean)- Apply strikethrough formatting.
font_family(string)- Font family name (e.g., 'Arial', 'Times New Roman').
font_size(object)- Font size with magnitude and unit.
foreground_color(object)- Text color as RGB values (0-1).
background_color(object)- Text highlight color as RGB values (0-1).
link(string)- URL to create a hyperlink.
paragraph_styleobject

Paragraph styling options.

Properties:
alignment(string)- Text alignment.
line_spacing(number)- Line spacing (100=single, 150=1.5x, 200=double).
indent_start(object)- Left indent with magnitude and unit.
indent_end(object)- Right indent with magnitude and unit.
indent_first_line(object)- First line indent with magnitude and unit.
insert_image5cr5 params(2 required)

Insert an inline image from a publicly accessible URL.

Insert an inline image from a publicly accessible URL.

document_idrequiredstring

Google Docs document ID.

image_urlrequiredstring

Publicly accessible URL of the image to insert.

locationinteger

1-based character index for insertion. Defaults to 1.

Range: 1 - ...
widthinteger

Image width in pixels.

Range: 1 - ...
heightinteger

Image height in pixels.

Range: 1 - ...
create_table5cr5 params(1 required)

Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it.

Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it.

document_idrequiredstring

Google Docs document ID.

rowsinteger

Number of table rows (1-100). Not needed if table_data is provided.

Range: 1 - 100
columnsinteger

Number of table columns (1-20). Not needed if table_data is provided.

Range: 1 - 20
table_dataarray

2D array of strings representing table cell data.

Array of: array
locationinteger

1-based character index for table insertion. Defaults to 1.

Range: 1 - ...
insert_page_break5cr2 params(1 required)

Insert a page break at a specific position.

Insert a page break at a specific position.

document_idrequiredstring

Google Docs document ID.

locationinteger

1-based character index for the page break. Defaults to 1.

Range: 1 - ...
insert_section_break5cr2 params(1 required)

Insert a section break at a specific position.

Insert a section break at a specific position.

document_idrequiredstring

Google Docs document ID.

locationinteger

1-based character index for the section break. Defaults to 1.

Range: 1 - ...
create_header5cr3 params(1 required)

Add a header to the document.

Add a header to the document.

document_idrequiredstring

Google Docs document ID.

header_typestring

Header type to create.

Values:
DEFAULTFIRST_PAGEEVEN_PAGEODD_PAGE
Default: DEFAULT
textstring

Header text content.

create_footer5cr2 params(1 required)

Add a footer to the document.

Add a footer to the document.

document_idrequiredstring

Google Docs document ID.

footer_typestring

Footer type to create.

Values:
DEFAULTFIRST_PAGEEVEN_PAGEODD_PAGE
Default: DEFAULT
update_style5cr5 params(4 required)

Alias for format_text. Apply text and/or paragraph styling to a character range.

Alias for format_text. Apply text and/or paragraph styling to a character range.

document_idrequiredstring

Google Docs document ID.

range_startrequiredinteger

Start index of the range to format (1-based).

Range: 1 - ...
range_endrequiredinteger

End index of the range to format (1-based).

Range: 1 - ...
text_stylerequiredobject

Text styling options (bold, italic, underline, strikethrough, font_family, font_size, foreground_color, background_color, link).

paragraph_styleobject

Paragraph styling options (alignment, line_spacing, indents).

create_named_range5cr4 params(4 required)

Create a named range (bookmark) spanning a character range in the document.

Create a named range (bookmark) spanning a character range in the document.

document_idrequiredstring

Google Docs document ID.

range_namerequiredstring

Name for the named range/bookmark.

range_startrequiredinteger

Start index of the range (1-based).

Range: 1 - ...
range_endrequiredinteger

End index of the range (1-based).

Range: 1 - ...
export_document5cr2 params(2 required)

Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content.

Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content.

document_idrequiredstring

Google Docs document ID.

export_formatrequiredstring

Target export format.

Values:
pdfdocxodtrtftxthtmlepubzip
share_document5cr4 params(2 required)

Set sharing permissions on a document via Google Drive.

Set sharing permissions on a document via Google Drive.

document_idrequiredstring

Google Docs document ID.

share_withrequiredarray

List of permission objects defining who to share with.

Array of: object
send_notificationboolean

Send email notification when sharing.

Default: true
email_messagestring

Custom message for the sharing notification email.

get_permissions5cr1 param(1 required)

List the current sharing permissions on a document.

List the current sharing permissions on a document.

document_idrequiredstring

Google Docs document ID.

quick_create5cr2 params(1 required)

Create a document from a natural language description. If the text contains 'titled "..."' or 'called "..."', the title is extracted automatically.

Create a document from a natural language description. If the text contains 'titled "..."' or 'called "..."', the title is extracted automatically.

textrequiredstring

Natural language description or content for the document.

titlestring

Document title. If omitted, may be extracted from the text description.

Frequently Asked Questions

How do I connect this tool to an external agent?

Install commands

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

Hosted MCP config

{
  "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\"}"
      }
    }
  }
}

How does an external agent use this tool?

Agent prompt

Call the AgentPMT-Tool-Search-and-Execution tool with action 'get_schema' and tool_id 6962fd6f4cf4309309cac7b0 ("Google Docs Connector"). Then call the same tool with action 'call_tool', tool_id 6962fd6f4cf4309309cac7b0, and the parameters needed for my request.

Workflows Using This Tool

2 / 4
Workflow
Saves ~45 min
Google Docs Connector
Grocery Shopping - Kroger
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.

Looking for help integrating AI into your business? Set up a free consultation.

Google Docs Connector by Apoth3osis | AgentPMT