KosmoKrator

productivity

Google Docs MCP, CLI, and Lua Integration for AI Agents

Google Docs integration docs for AI agents: MCP gateway setup, Google Docs CLI commands, Lua API reference, credentials, and function schemas.

14 functions 11 read 3 write OAuth browser flow auth

Google Docs for agents

OAuth can be configured in web hosts through redirect and in CLI hosts through local/device authorization; runtime works with stored tokens.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
google_docs
route_slug
google/google-docs
package
google
auth_strategy
oauth2_authorization_code OAuth browser flow
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
false

Quick Links

Google Docs MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Google Docs.

Google Docs CLI Matrix

Use these pages for direct Google Docs CLI workflows in scripts, CI, cron, and agent wrappers.

Function Catalog

FunctionTypeParametersDescription
google_docs.google_docs_add_bullets Write write 4 Add bullet or numbered list formatting to a range in a Google Docs document. Default preset is BULLET_DISC_CIRCLE_SQUARE. Use NUMBERED_DECIMAL_ALPHA_ROMAN for numbered lists.
google_docs.google_docs_create Read read 1 Create a new blank Google Docs document. Returns the document ID and URL.
google_docs.google_docs_delete_range Write write 3 Delete content in a Google Docs document by index range. Use google_docs_get_structure first to find the correct indexes.
google_docs.google_docs_format_text Read read 11 Apply formatting to a text range in a Google Docs document. Supports bold, italic, underline, strikethrough, fontSize (points), fontFamily, foregroundColor (hex like "#FF0000"), and link (URL).
google_docs.google_docs_get Read read 2 Get the content of a Google Docs document. Returns plain text by default, or a structured outline with character indexes when format is "structured". The document ID is the long string in the URL: docs.google.com/document/d/{documentId}/edit
google_docs.google_docs_get_structure Read read 1 Get a simplified structure of a Google Docs document showing heading hierarchy, paragraph indexes, and table positions. Essential before performing index-based editing operations. The document ID is the long string in the URL: docs.google.com/document/d/{documentId}/edit
google_docs.google_docs_insert_image Read read 5 Insert an image from a URL into a Google Docs document. Supports PNG, JPEG, and GIF. Optionally specify width and height in points.
google_docs.google_docs_insert_page_break Read read 2 Insert a page break into a Google Docs document. Omit index or set to -1 to insert at end.
google_docs.google_docs_insert_table Read read 4 Insert a table into a Google Docs document. Specify rows and columns. Omit index or set to -1 to insert at end.
google_docs.google_docs_insert_text Read read 3 Insert text into a Google Docs document at a specific position or at the end. Omit index or set to -1 to append at end.
google_docs.google_docs_remove_bullets Write write 3 Remove bullet or numbered list formatting from a range in a Google Docs document.
google_docs.google_docs_replace_all Read read 4 Find and replace all occurrences of text in a Google Docs document. No indexes needed — this is the simplest way to edit text.
google_docs.google_docs_search_text Read read 3 Find all occurrences of text in a Google Docs document with their start/end indexes. Useful before format_text or delete_range operations. The document ID is the long string in the URL: docs.google.com/document/d/{documentId}/edit
google_docs.google_docs_set_heading Read read 4 Set paragraph style (heading level) for a range in a Google Docs document. Valid styles: HEADING_1 through HEADING_6, TITLE, SUBTITLE, NORMAL_TEXT.