Server Details
| Property | Value |
|---|---|
| Transport | Streamable HTTP |
| Hosting | Remote (externally hosted) |
| Categories | Productivity & Collaboration, Business Operations, Google |
Authentication
This server supports the following authentication method:OAuth
Scopes:openid, email, profile, https://www.googleapis.com/auth/documents, https://www.googleapis.com/auth/documents.readonly
During the server onboarding flow, you will be prompted to complete the OAuth flow to grant access. See the Google Docs Authentication guide for step-by-step credential configuration.
Getting Started
Add the server
Navigate to the Server Library and click on the New Server button. Find Google Docs in the Caylex Catalog.
Use in a project
Add the server to a project by configuring project connections. Its tools are now available to any agents connected to that project.
Available Tools
This server provides 20 tools:docs_reply_to_document_comment
docs_reply_to_document_comment
Reply to a specific comment in a Google Document.Use docs_get_current_user to get the user_google_email or account information.
docs_get_doc_content
docs_get_doc_content
Retrieves content of a Google Doc or a Drive file (like .docx) identified by document_id.
- Native Google Docs: Fetches content via Docs API.
- Office files (.docx, etc.) stored in Drive: Downloads via Drive API and extracts text.
docs_find_and_replace_doc
docs_find_and_replace_doc
Finds and replaces text throughout a Google Doc.Use docs_get_current_user to get the user_google_email or account information.Args:
user_google_email: User’s Google email address
document_id: ID of the document to update
find_text: Text to search for
replace_text: Text to replace with
match_case: Whether to match case exactlyReturns:
str: Confirmation message with replacement count
docs_insert_doc_image
docs_insert_doc_image
Inserts an image into a Google Doc from Drive or a URL.Use docs_get_current_user to get the user_google_email or account information.Args:
user_google_email: User’s Google email address
document_id: ID of the document to update
image_source: Drive file ID or public image URL
index: Position to insert image (0-based)
width: Image width in points (optional)
height: Image height in points (optional)Returns:
str: Confirmation message with insertion details
docs_batch_update_doc
docs_batch_update_doc
Executes multiple document operations in a single atomic batch update.Use docs_get_current_user to get the user_google_email or account information.Args:
user_google_email: User’s Google email address
document_id: ID of the document to update
operations: List of operation dictionaries. Each operation should contain:
- type: Operation type (‘insert_text’, ‘delete_text’, ‘replace_text’, ‘format_text’, ‘insert_table’, ‘insert_page_break’)
- Additional parameters specific to each operation type
docs_debug_table_structure
docs_debug_table_structure
ESSENTIAL DEBUGGING TOOL - Use this whenever tables don’t work as expected.Use docs_get_current_user to get the user_google_email or account information.USE THIS IMMEDIATELY WHEN:
- Table population put data in wrong cells
- You get “table not found” errors
- Data appears concatenated in first cell
- Need to understand existing table structure
- Planning to use populate_existing_table
- Exact table dimensions (rows × columns)
- Each cell’s position coordinates (row,col)
- Current content in each cell
- Insertion indices for each cell
- Table boundaries and ranges
- “dimensions”: “2x3” = 2 rows, 3 columns
- ”position”: “(0,0)” = first row, first column
- ”current_content”: What’s actually in each cell right now
- ”insertion_index”: Where new text would be inserted in that cell
- After creating table → Use this to verify structure
- Before populating → Use this to plan your data format
- After population fails → Use this to see what went wrong
- When debugging → Compare your data array to actual table structure
docs_create_table_with_data
docs_create_table_with_data
Creates a table and populates it with data in one reliable operation.Use docs_get_current_user to get the user_google_email or account information.CRITICAL: YOU MUST CALL inspect_doc_structure FIRST TO GET THE INDEX!MANDATORY WORKFLOW - DO THESE STEPS IN ORDER:Step 1: ALWAYS call inspect_doc_structure first
Step 2: Use the ‘total_length’ value from inspect_doc_structure as your index
Step 3: Format data as 2D list: [[“col1”, “col2”], [“row1col1”, “row1col2”]]
Step 4: Call this function with the correct index and dataEXAMPLE DATA FORMAT:
table_data = [
[“Header1”, “Header2”, “Header3”], # Row 0 - headers
[“Data1”, “Data2”, “Data3”], # Row 1 - first data row
[“Data4”, “Data5”, “Data6”] # Row 2 - second data row
]CRITICAL INDEX REQUIREMENTS:
- NEVER use index values like 1, 2, 10 without calling inspect_doc_structure first
- ALWAYS get index from inspect_doc_structure ‘total_length’ field
- Index must be a valid insertion point in the document
- Must be 2D list of strings only
- Each inner list = one table row
- All rows MUST have same number of columns
- Use empty strings "" for empty cells, never None
- Use debug_table_structure after creation to verify results
docs_search_docs
docs_search_docs
Searches for Google Docs by name using Drive API (mimeType filter).Returns:
str: A formatted list of Google Docs matching the search query.
docs_list_docs_in_folder
docs_list_docs_in_folder
Lists Google Docs within a specific Drive folder.Returns:
str: A formatted list of Google Docs in the specified folder.
docs_create_doc
docs_create_doc
Creates a new Google Doc and optionally inserts initial content.Returns:
str: Confirmation message with document ID and link.
docs_update_doc_headers_footers
docs_update_doc_headers_footers
docs_create_document_comment
docs_create_document_comment
Create a new comment on a Google Document.Use docs_get_current_user to get the user_google_email or account information.
docs_export_doc_to_pdf
docs_export_doc_to_pdf
Exports a Google Doc to PDF format and saves it to Google Drive.Use docs_get_current_user to get the user_google_email or account information.Args:
user_google_email: User’s Google email address
document_id: ID of the Google Doc to export
pdf_filename: Name for the PDF file (optional - if not provided, uses original name + “_PDF”)
folder_id: Drive folder ID to save PDF in (optional - if not provided, saves in root)Returns:
str: Confirmation message with PDF file details and links
docs_read_document_comments
docs_read_document_comments
Read all comments from a Google Document.Use docs_get_current_user to get the user_google_email or account information.
docs_resolve_document_comment
docs_resolve_document_comment
Resolve a comment in a Google Document.Use docs_get_current_user to get the user_google_email or account information.
docs_get_current_user
docs_get_current_user
Returns the authenticated user’s account information for use with Docs tools. Use the returned email as user_google_email when calling docs_* tools. Uses the Bearer token from the request’s Authorization header.
docs_modify_doc_text
docs_modify_doc_text
Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.Use docs_get_current_user to get the user_google_email or account information.Args:
user_google_email: User’s Google email address
document_id: ID of the document to update
start_index: Start position for operation (0-based)
end_index: End position for text replacement/formatting (if not provided with text, text is inserted)
text: New text to insert or replace with (optional - can format existing text without changing it)
bold: Whether to make text bold (True/False/None to leave unchanged)
italic: Whether to make text italic (True/False/None to leave unchanged)
underline: Whether to underline text (True/False/None to leave unchanged)
font_size: Font size in points
font_family: Font family name (e.g., “Arial”, “Times New Roman”)
text_color: Foreground text color (#RRGGBB)
background_color: Background/highlight color (#RRGGBB)Returns:
str: Confirmation message with operation details
docs_insert_doc_elements
docs_insert_doc_elements
Inserts structural elements like tables, lists, or page breaks into a Google Doc.Use docs_get_current_user to get the user_google_email or account information.Args:
user_google_email: User’s Google email address
document_id: ID of the document to update
element_type: Type of element to insert (“table”, “list”, “page_break”)
index: Position to insert element (0-based)
rows: Number of rows for table (required for table)
columns: Number of columns for table (required for table)
list_type: Type of list (“UNORDERED”, “ORDERED”) (required for list)
text: Initial text content for list itemsReturns:
str: Confirmation message with insertion details
docs_inspect_doc_structure
docs_inspect_doc_structure
Essential tool for finding safe insertion points and understanding document structure.Use docs_get_current_user to get the user_google_email or account information.USE THIS FOR:
- Finding the correct index for table insertion
- Understanding document layout before making changes
- Locating existing tables and their positions
- Getting document statistics and complexity info
- total_elements: Number of document elements
- total_length: Maximum safe index for insertion
- tables: Number of existing tables
- table_details: Position and dimensions of each table
docs_update_paragraph_style
docs_update_paragraph_style
Apply paragraph-level formatting and/or heading styles to a range in a Google Doc.Use docs_get_current_user to get the user_google_email or account information.This tool can apply named heading styles (H1-H6) for semantic document structure,
and/or customize paragraph properties like alignment, spacing, and indentation.
Both can be applied in a single operation.Args:
user_google_email: User’s Google email address
document_id: Document ID to modify
start_index: Start position (1-based)
end_index: End position (exclusive) - should cover the entire paragraph
heading_level: Heading level 0-6 (0 = NORMAL_TEXT, 1 = H1, 2 = H2, etc.)
Use for semantic document structure
alignment: Text alignment - ‘START’ (left), ‘CENTER’, ‘END’ (right), or ‘JUSTIFIED’
line_spacing: Line spacing multiplier (1.0 = single, 1.5 = 1.5x, 2.0 = double)
indent_first_line: First line indent in points (e.g., 36 for 0.5 inch)
indent_start: Left/start indent in points
indent_end: Right/end indent in points
space_above: Space above paragraph in points (e.g., 12 for one line)
space_below: Space below paragraph in pointsReturns:
str: Confirmation message with formatting detailsExamples: