google-workspace-mcp-advanced
Provides tools for managing Gmail, including searching, reading, drafting, sending emails, and managing labels and filters.
Provides tools for creating and updating Google Docs, with support for Markdown insertion, tables, and images.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-workspace-mcp-advanced list my recent emails from Jane"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Workspace MCP Advanced
Production-ready MCP server for Google Workspace.
google-workspace-mcp-advanced gives MCP clients broad Google Workspace coverage with safe-by-default write operations, Markdown-to-Google-Docs support, and Drive sync workflows.
Why This Project
11 service domains: Gmail, Drive, Calendar, Docs, Sheets, Chat, Forms, Slides, Tasks, Search, Apps Script
100+ tools for read and write operations
Dry-run defaults for mutating operations
Strong Markdown rendering for Google Docs (kitchen-sink validated)
Persistent OAuth sessions and resilient auth storage
Related MCP server: google-workspace-mcp-server
Quick Start
1. Install uv
# macOS (Homebrew)
brew install uv
# Windows (winget)
winget install --id=astral-sh.uv -e
# Windows (PowerShell installer)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Linux/macOS (official installer)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Verify
uv --version2. Run the MCP server from PyPI (recommended)
# Stable channel (latest release)
uvx google-workspace-mcp-advanced --transport stdio
# Pinned deterministic version (recommended for teams)
uvx google-workspace-mcp-advanced==1.0.10 --transport stdio3. Add MCP client config
{
"mcpServers": {
"google-workspace": {
"command": "uvx",
"args": ["google-workspace-mcp-advanced==1.0.10", "--transport", "stdio"],
"env": {
"USER_GOOGLE_EMAIL": "your.email@company.com"
}
}
}
}4. Use client-specific setup guides
5. Authenticate on first run
Start the server from your MCP client.
Run any Google tool (for example, list calendars or list Drive files).
In
stdiomode (default), complete the device flow:open the verification URL,
enter the user code,
retry your tool call.
if device flow is unsupported for your OAuth client type, the server falls back to callback flow automatically.
In
streamable-http, complete callback auth by opening the OAuth URL shown by the server.for MCP-hosted/manual completion workflows, use
complete_google_authwith the browser callback URL.
Credentials are saved in
~/.config/google-workspace-mcp-advanced/credentials/.Legacy directory
~/.config/gws-mcp-advanced/is still supported for migration.
Single-MCP Multi-Client Mode
Use one MCP entry with multiple OAuth clients (for example private + enterprise tenants) via:
auth_clients.jsonunderWORKSPACE_MCP_CONFIG_DIRdeterministic routing by
script_clients,account_clients, anddomain_clientssetup tools:
setup_google_auth_clients,import_google_auth_clientcompletion tool:
complete_google_auth
Guide:
Local Development Mode
Use repository-local execution when building or testing unreleased changes.
{
"mcpServers": {
"google-workspace-dev": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/google-workspace-mcp-advanced",
"google-workspace-mcp-advanced",
"--transport",
"stdio"
],
"env": {
"USER_GOOGLE_EMAIL": "your.email@company.com"
}
}
}
}Service Coverage
Service | Example Capabilities |
Gmail | search, read, draft, send, labels, filters |
Drive | search, read, upload, permissions, ownership transfer |
Calendar | list/create/modify/delete events |
Docs | create/update docs, markdown insertion, table and image handling |
Sheets | read/write ranges, formatting, conditional formatting |
Chat | list spaces, read/send messages |
Forms | create forms, read responses, update publish settings |
Slides | create presentations, batch updates |
Tasks | task lists and task lifecycle management |
Search | programmable search endpoint support |
Apps Script | project metadata/content, versions, deployments, processes, metrics, and safe-by-default mutators |
Safety Model
Mutating tools default to
dry_run=True.You must pass
dry_run=Falseto execute real changes.This reduces accidental writes during assistant experimentation.
Common Runtime Commands
# Run locally from repo
uv run google-workspace-mcp-advanced --transport stdio
# HTTP transport
uv run google-workspace-mcp-advanced --transport streamable-http
# Single-user mode
uv run google-workspace-mcp-advanced --single-user
# Load specific service groups only
uv run google-workspace-mcp-advanced --tools gmail drive calendarRequired Environment Variables
Variable | Required | Description |
| Yes | Target Google account email |
| Yes for legacy single-client mode | OAuth client ID |
| Yes for legacy single-client mode | OAuth client secret |
| No | Config/credential directory override |
| No | Auth interaction mode: |
Migration from Legacy Name
If you previously ran the project as gws-mcp-advanced, follow:
Documentation
User docs: docs/INDEX.md
Client setup hub: docs/setup/MCP_CLIENT_SETUP_GUIDE.md
Migration guide: docs/setup/MIGRATING_FROM_GWS_MCP_ADVANCED.md
Authentication model: docs/setup/AUTHENTICATION_MODEL.md
Single-MCP multi-client auth setup: docs/setup/MULTI_CLIENT_AUTH_SETUP.md
Apps Script setup and limitations: docs/setup/APPS_SCRIPT_SETUP.md
Apps Script capabilities and workflows: docs/setup/APPS_SCRIPT_USER_GUIDE.md
Apps Script + clasp workflows: docs/setup/APPS_SCRIPT_CLASP_GUIDE.md
Claude Code setup: docs/setup/CLAUDE_CODE_MCP_SETUP.md
Cursor setup: docs/setup/CURSOR_MCP_SETUP.md
OpenCode setup: docs/setup/OPENCODE_MCP_SETUP.md
Gemini CLI setup: docs/setup/GEMINI_CLI_MCP_SETUP.md
Cadence workflow user guide: docs/setup/LIVE_CADENCE_WORKFLOW.md
Distribution/release guide: docs/DISTRIBUTION_RELEASE.md
Release notes: docs/RELEASE_NOTES.md
Comparison with upstream: docs/COMPARISON.md
Contributor docs live in AGENTS.md and agent-docs/.
Available Tools
126 toolsadd_conditional_formattingA
Adds a conditional formatting rule to a range.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (str): A1-style range (optionally with sheet name). Required. condition_type (str): Sheets condition type (e.g., NUMBER_GREATER, TEXT_CONTAINS, DATE_BEFORE, CUSTOM_FORMULA). condition_values (Optional[Union[str, List[Union[str, int, float]]]]): Values for the condition; accepts a list or a JSON string representing a list. Depends on condition_type. background_color (Optional[str]): Hex background color to apply when condition matches. text_color (Optional[str]): Hex text color to apply when condition matches. rule_index (Optional[int]): Optional position to insert the rule (0-based) within the sheet's rules. gradient_points (Optional[Union[str, List[dict]]]): List (or JSON list) of gradient points for a color scale. If provided, a gradient rule is created and boolean parameters are ignored. dry_run (bool): When True (default), return planned rule details without mutating the sheet.
Returns: str: Confirmation of the added rule.
Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), condition_type (required), +6 more. Returns: result
batch_modify_gmail_message_labelsA
Adds or removes labels from multiple Gmail messages in a single batch request.
Args: user_google_email (str): The user's Google email address. Required. message_ids (List[str]): A list of message IDs to modify. add_label_ids (Optional[List[str]]): List of label IDs to add to the messages. remove_label_ids (Optional[List[str]]): List of label IDs to remove from the messages. dry_run (bool): If True, preview batch label changes without mutating messages.
Returns: str: Confirmation message of the label changes applied to the messages.
Inputs: user_google_email (required), message_ids (required), add_label_ids, remove_label_ids, +1 more. Returns: result
batch_update_docA
Executes multiple document operations in a single atomic batch update.
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', 'insert_markdown') - Additional parameters specific to each operation type dry_run: When True (default), return planned batch summary without executing it
Example operations: [ {"type": "insert_text", "index": 1, "text": "Hello World"}, {"type": "format_text", "start_index": 1, "end_index": 12, "bold": true}, {"type": "insert_table", "index": 20, "rows": 2, "columns": 3}, {"type": "insert_markdown", "markdown_text": "# Heading\n\nBold text", "index": 1} ]
Returns: str: Confirmation message with batch operation results
Inputs: user_google_email (required), document_id (required), operations (required), dry_run. Returns: result
batch_update_presentationC
Apply batch updates to a Google Slides presentation.
Args: user_google_email (str): The user's Google email address. Required. presentation_id (str): The ID of the presentation to update. requests (List[Dict[str, Any]]): List of update requests to apply.
Returns: str: Details about the batch update operation results.
Inputs: user_google_email (required), presentation_id (required), requests (required), dry_run. Returns: result
check_drive_file_public_accessA
Searches for a file by name and checks if it has public link sharing enabled.
Args: user_google_email (str): The user's Google email address. Required. file_name (str): The name of the file to check.
Returns: str: Information about the file's sharing status and whether it can be used in Google Docs.
Inputs: user_google_email (required), file_name (required). Returns: result
clear_completed_tasksA
Clear all completed tasks from a task list. The tasks will be marked as hidden.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to clear completed tasks from. dry_run (bool): When True (default), return planned mutation without executing.
Returns: str: Confirmation message.
Inputs: user_google_email (required), task_list_id (required), dry_run. Returns: result
complete_google_authA
Complete Google OAuth after start_google_auth.
Preferred input is callback_url (the full redirected URL copied from the browser).
Fallback input supports (authorization_code, state) when full callback URL is unavailable.
Inputs: service_name (required), user_google_email (required), callback_url, authorization_code, +1 more. Returns: result
create_deploymentA
Create an Apps Script deployment.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. description: Deployment description. version_number: Version number for deployment (must be >= 1). dry_run: Preview deployment creation without mutation. Defaults to True.
Returns: str: Confirmation of preview or deployment creation.
Inputs: user_google_email (required), script_id (required), description (required), version_number (required), +1 more. Returns: result
create_docA
Creates a new Google Doc and optionally inserts initial content.
When parse_markdown=True (default), the content is parsed as Markdown and
converted to native Google Docs formatting (headings, bold, italic, lists,
links, code blocks, blockquotes). Set parse_markdown=False to insert
content as plain text without any formatting.
Args:
user_google_email: User's Google email address.
title: The title of the new document.
content: Optional initial content. Interpreted as Markdown by default.
parse_markdown: If True (default), parse content as Markdown and apply
formatting. If False, insert content as plain text.
checklist_mode: Checklist rendering mode for markdown task lists:
unicode (default) or native.
mention_mode: Mention rendering mode for markdown mentions:
text (default) or person_chip.
dry_run: When True (default), preview create/update actions without executing them.
Returns: str: Confirmation message with document ID and link.
Examples: # Create doc with Markdown content (default behavior) create_doc(title="My Doc", content="# Heading\n\nBold text")
# Create doc with native checklist bullets
create_doc(title="Checklist Doc", content="- [ ] One\n- [x] Two", checklist_mode="native")
# Create doc with plain text (no Markdown parsing)
create_doc(title="Plain Doc", content="# This is literal text", parse_markdown=False)Inputs: user_google_email (required), title (required), content, parse_markdown, +3 more. Returns: result
create_document_commentC
Create a new comment on a Google Document.
Inputs: user_google_email (required), document_id (required), comment_content (required). Returns: result
create_drive_fileA
Creates a new file in Google Drive, supporting creation within shared drives. Accepts either direct content or a fileUrl to fetch the content from.
Args: user_google_email (str): The user's Google email address. Required. file_name (str): The name for the new file. content (Optional[str]): If provided, the content to write to the file. folder_id (str): The ID of the parent folder. Defaults to 'root'. For shared drives, this must be a folder ID within the shared drive. mime_type (str): The MIME type of the file. Defaults to 'text/plain'. fileUrl (Optional[str]): If provided, fetches the file content from this URL. Supports file://, http://, and https:// protocols. dry_run (bool): If True, returns a preview and does not create the file. Defaults to True.
Returns: str: Confirmation message of the successful file creation with file link.
Inputs: user_google_email (required), file_name (required), content, folder_id, +3 more. Returns: result
create_eventA
Creates a new event.
Args: user_google_email (str): The user's Google email address. Required. summary (str): Event title. start_time (str): Start time (RFC3339, e.g., "2023-10-27T10:00:00-07:00" or "2023-10-27" for all-day). end_time (str): End time (RFC3339, e.g., "2023-10-27T11:00:00-07:00" or "2023-10-28" for all-day). calendar_id (str): Calendar ID (default: 'primary'). description (Optional[str]): Event description. location (Optional[str]): Event location. attendees (Optional[List[str]]): Attendee email addresses. timezone (Optional[str]): Timezone (e.g., "America/New_York"). attachments (Optional[List[str]]): List of Google Drive file URLs or IDs to attach to the event. add_google_meet (bool): Whether to add a Google Meet video conference to the event. Defaults to False. reminders (Optional[Union[str, List[Dict[str, Any]]]]): JSON string or list of reminder objects. Each should have 'method' ("popup" or "email") and 'minutes' (0-40320). Max 5 reminders. Example: '[{"method": "popup", "minutes": 15}]' or [{"method": "popup", "minutes": 15}] use_default_reminders (bool): Whether to use calendar's default reminders. If False, uses custom reminders. Defaults to True. transparency (Optional[str]): Event transparency for busy/free status. "opaque" shows as Busy (default), "transparent" shows as Available/Free. Defaults to None (uses Google Calendar default). visibility (Optional[str]): Event visibility. "default" uses calendar default, "public" is visible to all, "private" is visible only to attendees, "confidential" is same as private (legacy). Defaults to None (uses Google Calendar default). dry_run (bool): If True, returns a preview and does not create the event. Defaults to True.
Returns: str: Confirmation message of the successful event creation with event link.
Inputs: user_google_email (required), summary (required), start_time (required), end_time (required), +12 more. Returns: result
create_formC
Create a new form using the title given in the provided form message in the request.
Args: user_google_email (str): The user's Google email address. Required. title (str): The title of the form. description (Optional[str]): The description of the form. document_title (Optional[str]): The document title (shown in browser tab).
Returns: str: Confirmation message with form ID and edit URL.
Inputs: user_google_email (required), title (required), description, document_title, +1 more. Returns: result
create_gmail_filterA
Creates a Gmail filter using the users.settings.filters API.
Args: user_google_email (str): The user's Google email address. Required. criteria (Dict[str, Any]): Criteria for matching messages. action (Dict[str, Any]): Actions to apply to matched messages. dry_run (bool): If True, returns a preview and does not create the filter. Defaults to True.
Returns: str: Confirmation message with the created filter ID.
Inputs: user_google_email (required), criteria (required), action (required), dry_run. Returns: result
create_presentationA
Create a new Google Slides presentation.
Args: user_google_email (str): The user's Google email address. Required. title (str): The title for the new presentation. Defaults to "Untitled Presentation".
Returns: str: Details about the created presentation including ID and URL.
Inputs: user_google_email (required), title, dry_run. Returns: result
create_presentation_commentC
Create a new comment on a Google Presentation.
Inputs: user_google_email (required), presentation_id (required), comment_content (required). Returns: result
create_script_projectA
Create a new Apps Script project.
Args: user_google_email: The user's Google email address. Required. title: Script project title. parent_id: Optional parent Drive file ID. dry_run: Preview creation without mutation. Defaults to True.
Returns: str: Confirmation of preview or creation.
Inputs: user_google_email (required), title (required), parent_id, dry_run. Returns: result
create_sheetA
Creates a new sheet within an existing spreadsheet.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. sheet_name (str): The name of the new sheet. Required. dry_run (bool): When True (default), return planned sheet creation without mutating the spreadsheet.
Returns: str: Confirmation message of the successful sheet creation.
Inputs: user_google_email (required), spreadsheet_id (required), sheet_name (required), dry_run. Returns: result
create_spreadsheetB
Creates a new Google Spreadsheet.
Args: user_google_email (str): The user's Google email address. Required. title (str): The title of the new spreadsheet. Required. sheet_names (Optional[List[str]]): List of sheet names to create. If not provided, creates one sheet with default name.
Returns: str: Information about the newly created spreadsheet including ID, URL, and locale.
Inputs: user_google_email (required), title (required), sheet_names, dry_run. Returns: result
create_spreadsheet_commentC
Create a new comment on a Google Spreadsheet.
Inputs: user_google_email (required), spreadsheet_id (required), comment_content (required). Returns: result
create_table_with_dataA
Creates a table and populates it with data in one reliable operation.
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 data
EXAMPLE 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
DATA FORMAT REQUIREMENTS:
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
Args: user_google_email: User's Google email address document_id: ID of the document to update table_data: 2D list of strings - EXACT format: [["col1", "col2"], ["row1col1", "row1col2"]] index: Document position (MANDATORY: get from inspect_doc_structure 'total_length') bold_headers: Whether to make first row bold (default: true) dry_run: When True (default), return planned mutation without executing it
Returns: str: Confirmation with table details and link
Inputs: user_google_email (required), document_id (required), table_data (required), index (required), +2 more. Returns: result
create_taskB
Create a new task in a task list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to create the task in. title (str): The title of the task. notes (Optional[str]): Notes/description for the task. due (Optional[str]): Due date in RFC 3339 format (e.g., "2024-12-31T23:59:59Z"). parent (Optional[str]): Parent task ID (for subtasks). previous (Optional[str]): Previous sibling task ID (for positioning).
Returns: str: Confirmation message with the new task ID and details.
Inputs: user_google_email (required), task_list_id (required), title (required), notes, +4 more. Returns: result
create_task_listC
Create a new task list.
Args: user_google_email (str): The user's Google email address. Required. title (str): The title of the new task list.
Returns: str: Confirmation message with the new task list ID and details.
Inputs: user_google_email (required), title (required), dry_run. Returns: result
create_versionA
Create a new version for an Apps Script project.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. description: Optional version description. dry_run: Preview version creation without mutation. Defaults to True.
Returns: str: Confirmation of preview or version creation.
Inputs: user_google_email (required), script_id (required), description, dry_run. Returns: result
debug_table_structureA
ESSENTIAL DEBUGGING TOOL - Use this whenever tables don't work as expected.
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
WHAT THIS SHOWS YOU:
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
HOW TO READ THE OUTPUT:
"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
WORKFLOW INTEGRATION:
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
Args: user_google_email: User's Google email address document_id: ID of the document to inspect table_index: Which table to debug (0 = first table, 1 = second table, etc.)
Returns: str: Detailed JSON structure showing table layout, cell positions, and current content
Inputs: user_google_email (required), document_id (required), table_index. Returns: result
delete_conditional_formattingA
Deletes an existing conditional formatting rule by index on a sheet.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. rule_index (int): Index of the rule to delete (0-based). sheet_name (Optional[str]): Name of the sheet that contains the rule. Defaults to the first sheet if not provided. dry_run (bool): When True (default), return planned deletion without mutating the sheet.
Returns: str: Confirmation of the deletion and the current rule state.
Inputs: user_google_email (required), spreadsheet_id (required), rule_index (required), sheet_name, +1 more. Returns: result
delete_deploymentA
Delete an Apps Script deployment.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. deployment_id: The deployment ID to delete. dry_run: Preview deletion without mutation. Defaults to True.
Returns: str: Confirmation of preview or deletion.
Inputs: user_google_email (required), script_id (required), deployment_id (required), dry_run. Returns: result
delete_eventB
Deletes an existing event.
Args: user_google_email (str): The user's Google email address. Required. event_id (str): The ID of the event to delete. calendar_id (str): Calendar ID (default: 'primary'). dry_run (bool): If True, returns a preview and does not delete the event. Defaults to True.
Returns: str: Confirmation message of the successful event deletion.
Inputs: user_google_email (required), event_id (required), calendar_id, dry_run. Returns: result
delete_gmail_filterA
Deletes a Gmail filter by ID.
Args: user_google_email (str): The user's Google email address. Required. filter_id (str): The ID of the filter to delete. dry_run (bool): If True, returns a preview and does not delete the filter. Defaults to True.
Returns: str: Confirmation message for the deletion.
Inputs: user_google_email (required), filter_id (required), dry_run. Returns: result
delete_script_projectA
Delete (trash) a standalone Apps Script project by Drive file ID.
Limitation: only standalone script files are supported. Container-bound scripts are not addressable via this Drive-backed deletion path.
Args: user_google_email: The user's Google email address. Required. script_id: Apps Script Drive file ID. dry_run: Preview deletion without mutation. Defaults to True.
Returns: str: Confirmation of preview or deletion.
Inputs: user_google_email (required), script_id (required), dry_run. Returns: result
delete_taskA
Delete a task from a task list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list containing the task. task_id (str): The ID of the task to delete. dry_run (bool): When True (default), return planned mutation without executing.
Returns: str: Confirmation message.
Inputs: user_google_email (required), task_list_id (required), task_id (required), dry_run. Returns: result
delete_task_listA
Delete a task list. Note: This will also delete all tasks in the list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to delete. dry_run (bool): When True (default), return planned mutation without executing.
Returns: str: Confirmation message.
Inputs: user_google_email (required), task_list_id (required), dry_run. Returns: result
download_doc_tabsB
Download a Google Doc using "Hybrid Split-Sync". Creates a folder containing:
_Full_Export.md: The entire doc as Markdown (High Fidelity).
[TabName].md: Raw text content of each individual tab.
Args: user_google_email: The user's Google email address. Required. local_dir: Local directory to save files into. file_id: The Google Drive file ID or its search alias (e.g. "A"). dry_run: If True (default), return planned tab-download operation without local writes.
Inputs: user_google_email (required), local_dir (required), file_id (required), dry_run. Returns: result
download_google_docA
Download content from a linked Google Doc and SAVE it to a local file. SAFETY: Defaults to dry_run=True. Usage must explicitly set dry_run=False to apply changes.
Args: user_google_email: The user's Google email address. Required. local_path: Path to the local file. format: Output format ('markdown', 'html', 'pdf', 'docx'). include_comments: If True, append comments to the end. rewrite_links: If True, rewrite internal doc links to local file links. dry_run: If True (default), return a diff of changes (for text/markdown) or preview. Set False to save.
Inputs: user_google_email (required), local_path (required), format, include_comments, +2 more. Returns: result
draft_gmail_messageA
Creates a draft email in the user's Gmail account. Supports both new drafts and reply drafts.
Args: user_google_email (str): The user's Google email address. Required. subject (str): Email subject. body (str): Email body (plain text). body_format (Literal['plain', 'html']): Email body format. Defaults to 'plain'. to (Optional[str]): Optional recipient email address. Can be left empty for drafts. cc (Optional[str]): Optional CC email address. bcc (Optional[str]): Optional BCC email address. thread_id (Optional[str]): Optional Gmail thread ID to reply within. When provided, creates a reply draft. in_reply_to (Optional[str]): Optional Message-ID of the message being replied to. Used for proper threading. references (Optional[str]): Optional chain of Message-IDs for proper threading. Should include all previous Message-IDs.
Returns: str: Confirmation message with the created draft's ID.
Examples: # Create a new draft draft_gmail_message(subject="Hello", body="Hi there!", to="user@example.com")
# Create a plaintext draft with CC and BCC
draft_gmail_message(
subject="Project Update",
body="Here's the latest update...",
to="user@example.com",
cc="manager@example.com",
bcc="archive@example.com"
)
# Create a HTML draft with CC and BCC
draft_gmail_message(
subject="Project Update",
body="<strong>Hi there!</strong>",
body_format="html",
to="user@example.com",
cc="manager@example.com",
bcc="archive@example.com"
)
# Create a reply draft in plaintext
draft_gmail_message(
subject="Re: Meeting tomorrow",
body="Thanks for the update!",
to="user@example.com",
thread_id="thread_123",
in_reply_to="<message123@gmail.com>",
references="<original@gmail.com> <message123@gmail.com>"
)
# Create a reply draft in HTML
draft_gmail_message(
subject="Re: Meeting tomorrow",
body="<strong>Thanks for the update!</strong>",
body_format="html,
to="user@example.com",
thread_id="thread_123",
in_reply_to="<message123@gmail.com>",
references="<original@gmail.com> <message123@gmail.com>"
)Inputs: user_google_email (required), subject (required), body (required), body_format, +7 more. Returns: result
export_doc_to_pdfA
Exports a Google Doc to PDF format and saves it to Google Drive.
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
Inputs: user_google_email (required), document_id (required), pdf_filename, folder_id. Returns: result
find_and_replace_docA
Finds and replaces text throughout a Google Doc.
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 exactly dry_run: When True (default), return planned mutation without executing it
Returns: str: Confirmation message with replacement count
Inputs: user_google_email (required), document_id (required), find_text (required), replace_text (required), +2 more. Returns: result
format_sheet_rangeA
Applies formatting to a range: background/text color and number/date formats.
Colors accept hex strings (#RRGGBB). Number formats follow Sheets types (e.g., NUMBER, NUMBER_WITH_GROUPING, CURRENCY, DATE, TIME, DATE_TIME, PERCENT, TEXT, SCIENTIFIC). If no sheet name is provided, the first sheet is used.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (str): A1-style range (optionally with sheet name). Required. background_color (Optional[str]): Hex background color (e.g., "#FFEECC"). text_color (Optional[str]): Hex text color (e.g., "#000000"). number_format_type (Optional[str]): Sheets number format type (e.g., "DATE"). number_format_pattern (Optional[str]): Optional custom pattern for the number format. dry_run (bool): When True (default), return planned formatting without mutating the sheet.
Returns: str: Confirmation of the applied formatting.
Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), background_color, +4 more. Returns: result
get_doc_contentA
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.
Returns: str: The document content with metadata header.
Inputs: user_google_email (required), document_id (required). Returns: result
get_drive_file_contentA
Retrieves the content of a specific Google Drive file by ID, supporting files in shared drives.
• Native Google Docs, Sheets, Slides → exported as text / CSV. • Office files (.docx, .xlsx, .pptx) → unzipped & parsed with std-lib to extract readable text. • Any other file → downloaded; tries UTF-8 decode, else notes binary.
Args: user_google_email: The user's Google email address. file_id: Drive file ID.
Returns: str: The file content as plain text with metadata header.
Inputs: user_google_email (required), file_id (required). Returns: result
get_drive_file_download_urlA
Gets a download URL for a Google Drive file. The file is prepared and made available via HTTP URL.
For Google native files (Docs, Sheets, Slides), exports to a useful format: • Google Docs → PDF (default) or DOCX if export_format='docx' • Google Sheets → XLSX (default) or CSV if export_format='csv' • Google Slides → PDF (default) or PPTX if export_format='pptx'
For other files, downloads the original file format.
Args: user_google_email: The user's Google email address. Required. file_id: The Google Drive file ID to get a download URL for. export_format: Optional export format for Google native files. Options: 'pdf', 'docx', 'xlsx', 'csv', 'pptx'. If not specified, uses sensible defaults (PDF for Docs/Slides, XLSX for Sheets).
Returns: str: Download URL and file metadata. The file is available at the URL for 1 hour.
Inputs: user_google_email (required), file_id (required), export_format. Returns: result
get_drive_file_permissionsB
Gets detailed metadata about a Google Drive file including sharing permissions.
Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file to check permissions for.
Returns: str: Detailed file metadata including sharing status and URLs.
Inputs: user_google_email (required), file_id (required). Returns: result
get_eventsA
Retrieves events from a specified Google Calendar. Can retrieve a single event by ID or multiple events within a time range. You can also search for events by keyword by supplying the optional "query" param.
Args:
user_google_email (str): The user's Google email address. Required.
calendar_id (str): The ID of the calendar to query. Use 'primary' for the user's primary calendar. Defaults to 'primary'. Calendar IDs can be obtained using list_calendars.
event_id (Optional[str]): The ID of a specific event to retrieve. If provided, retrieves only this event and ignores time filtering parameters.
time_min (Optional[str]): The start of the time range (inclusive) in RFC3339 format (e.g., '2024-05-12T10:00:00Z' or '2024-05-12'). If omitted, defaults to the current time. Ignored if event_id is provided.
time_max (Optional[str]): The end of the time range (exclusive) in RFC3339 format. If omitted, events starting from time_min onwards are considered (up to max_results). Ignored if event_id is provided.
max_results (int): The maximum number of events to return. Defaults to 25. Ignored if event_id is provided.
query (Optional[str]): A keyword to search for within event fields (summary, description, location). Ignored if event_id is provided.
detailed (bool): Whether to return detailed event information including description, location, attendees, and attendee details (response status, organizer, optional flags). Defaults to False.
include_attachments (bool): Whether to include attachment information in detailed event output. When True, shows attachment details (fileId, fileUrl, mimeType, title) for events that have attachments. Only applies when detailed=True. Set this to True when you need to view or access files that have been attached to calendar events, such as meeting documents, presentations, or other shared files. Defaults to False.
Returns: str: A formatted list of events (summary, start and end times, link) within the specified range, or detailed information for a single event if event_id is provided.
Inputs: user_google_email (required), calendar_id, event_id, time_min, +5 more. Returns: result
get_formA
Get a form.
Args: user_google_email (str): The user's Google email address. Required. form_id (str): The ID of the form to retrieve.
Returns: str: Form details including title, description, questions, and URLs.
Inputs: user_google_email (required), form_id (required). Returns: result
get_form_responseA
Get one response from the form.
Args: user_google_email (str): The user's Google email address. Required. form_id (str): The ID of the form. response_id (str): The ID of the response to retrieve.
Returns: str: Response details including answers and metadata.
Inputs: user_google_email (required), form_id (required), response_id (required). Returns: result
get_gmail_attachment_contentA
Downloads the content of a specific email attachment.
Args: message_id (str): The ID of the Gmail message containing the attachment. attachment_id (str): The ID of the attachment to download. user_google_email (str): The user's Google email address. Required.
Returns: str: Attachment metadata and base64-encoded content that can be decoded and saved.
Inputs: message_id (required), attachment_id (required), user_google_email (required). Returns: result
get_gmail_message_contentA
Retrieves the full content (subject, sender, recipients, plain text body) of a specific Gmail message.
Args: message_id (str): The unique ID of the Gmail message to retrieve. user_google_email (str): The user's Google email address. Required.
Returns: str: The message details including subject, sender, recipients (To, Cc), and body content.
Inputs: message_id (required), user_google_email (required). Returns: result
get_gmail_messages_content_batchA
Retrieves the content of multiple Gmail messages in a single batch request. Supports up to 25 messages per batch to prevent SSL connection exhaustion.
Args: message_ids (List[str]): List of Gmail message IDs to retrieve (max 25 per batch). user_google_email (str): The user's Google email address. Required. format (Literal["full", "metadata"]): Message format. "full" includes body, "metadata" only headers.
Returns: str: A formatted list of message contents including subject, sender, recipients (To, Cc), and body (if full format).
Inputs: message_ids (required), user_google_email (required), format. Returns: result
get_gmail_thread_contentA
Retrieves the complete content of a Gmail conversation thread, including all messages.
Args: thread_id (str): The unique ID of the Gmail thread to retrieve. user_google_email (str): The user's Google email address. Required.
Returns: str: The complete thread content with all messages formatted for reading.
Inputs: thread_id (required), user_google_email (required). Returns: result
get_gmail_threads_content_batchA
Retrieves the content of multiple Gmail threads in a single batch request. Supports up to 25 threads per batch to prevent SSL connection exhaustion.
Args: thread_ids (List[str]): A list of Gmail thread IDs to retrieve. The function will automatically batch requests in chunks of 25. user_google_email (str): The user's Google email address. Required.
Returns: str: A formatted list of thread contents with separators.
Inputs: thread_ids (required), user_google_email (required). Returns: result
get_messagesC
Retrieves messages from a Google Chat space.
Returns: str: Formatted messages from the specified space.
Inputs: user_google_email (required), space_id (required), page_size, order_by. Returns: result
get_pageA
Get details about a specific page (slide) in a presentation.
Args: user_google_email (str): The user's Google email address. Required. presentation_id (str): The ID of the presentation. page_object_id (str): The object ID of the page/slide to retrieve.
Returns: str: Details about the specific page including elements and layout.
Inputs: user_google_email (required), presentation_id (required), page_object_id (required). Returns: result
get_page_thumbnailA
Generate a thumbnail URL for a specific page (slide) in a presentation.
Args: user_google_email (str): The user's Google email address. Required. presentation_id (str): The ID of the presentation. page_object_id (str): The object ID of the page/slide. thumbnail_size (str): Size of thumbnail ("LARGE", "MEDIUM", "SMALL"). Defaults to "MEDIUM".
Returns: str: URL to the generated thumbnail image.
Inputs: user_google_email (required), presentation_id (required), page_object_id (required), thumbnail_size. Returns: result
get_presentationA
Get details about a Google Slides presentation.
Args: user_google_email (str): The user's Google email address. Required. presentation_id (str): The ID of the presentation to retrieve.
Returns: str: Details about the presentation including title, slides count, and metadata.
Inputs: user_google_email (required), presentation_id (required). Returns: result
get_script_contentB
Get Apps Script project content, optionally pinned to a version.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. version_number: Optional script version number.
Returns: str: Script files and metadata.
Inputs: user_google_email (required), script_id (required), version_number. Returns: result
get_script_metricsB
Get Apps Script metrics for a script.
Args:
user_google_email: The user's Google email address. Required.
script_id: The Apps Script project ID.
metrics_granularity: Metrics granularity (DAILY or WEEKLY).
metrics_filter_json: Optional JSON object for metrics filter.
Returns: str: Metrics summary.
Inputs: user_google_email (required), script_id (required), metrics_granularity, metrics_filter_json. Returns: result
get_script_projectB
Get metadata for an Apps Script project.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID.
Returns: str: Formatted Apps Script project metadata.
Inputs: user_google_email (required), script_id (required). Returns: result
get_search_engine_infoB
Retrieves metadata about a Programmable Search Engine.
Args: user_google_email (str): The user's Google email address. Required.
Returns: str: Information about the search engine including its configuration and available refinements.
Inputs: user_google_email (required). Returns: result
get_spreadsheet_infoA
Gets information about a specific spreadsheet including its sheets.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet to get info for. Required.
Returns: str: Formatted spreadsheet information including title, locale, and sheets list.
Inputs: user_google_email (required), spreadsheet_id (required). Returns: result
get_taskA
Get details of a specific task.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list containing the task. task_id (str): The ID of the task to retrieve.
Returns: str: Task details including title, notes, status, due date, etc.
Inputs: user_google_email (required), task_list_id (required), task_id (required). Returns: result
get_task_listA
Get details of a specific task list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to retrieve.
Returns: str: Task list details including title, ID, and last updated time.
Inputs: user_google_email (required), task_list_id (required). Returns: result
get_versionB
Get metadata for a specific Apps Script version.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. version_number: Script version number.
Returns: str: Version metadata.
Inputs: user_google_email (required), script_id (required), version_number (required). Returns: result
import_google_auth_clientC
Import a Google OAuth client JSON into auth_clients.json and apply script/account/domain mappings.
This is an admin/setup tool for enterprise/private multi-client routing.
Inputs: client_key (required), oauth_client_json_path (required), mapped_script_ids, mapped_accounts, +3 more. Returns: result
insert_doc_elementsA
Inserts structural elements like tables, lists, or page breaks into a Google Doc.
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 items dry_run: When True (default), return planned mutation without executing it
Returns: str: Confirmation message with insertion details
Inputs: user_google_email (required), document_id (required), element_type (required), index (required), +5 more. Returns: result
insert_doc_imageA
Inserts an image into a Google Doc from Drive or a URL.
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) dry_run: When True (default), return planned mutation without executing it
Returns: str: Confirmation message with insertion details
Inputs: user_google_email (required), document_id (required), image_source (required), index (required), +3 more. Returns: result
insert_markdownA
Insert Markdown-formatted content into a Google Doc.
Converts Markdown syntax (headings, bold, italic, lists, links, code blocks,
blockquotes) into native Google Docs formatting via batchUpdate requests.
Args:
user_google_email: User's Google email address.
document_id: ID of the document to update (supports A-Z aliases from search).
markdown_text: Markdown string to convert and insert.
index: Document index to start insertion at (1-based, default: 1).
Index 1 is the start of the document body.
checklist_mode: Checklist rendering mode for markdown task lists:
`unicode` (default) or `native`.
mention_mode: Mention rendering mode for markdown mentions:
`text` (default) or `person_chip`.
dry_run: When True (default), return planned mutation without executing it
Returns:
str: Confirmation message with document link and request count.
Example:
insert_markdown(
document_id="abc123",
markdown_text="# WelcomeThis is bold and italic text.
Item 1
Item 2" )
Inputs: user_google_email (required), document_id (required), markdown_text (required), index, +3 more. Returns: result
inspect_doc_structureA
Essential tool for finding safe insertion points and understanding document structure.
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
CRITICAL FOR TABLE OPERATIONS: ALWAYS call this BEFORE creating tables to get a safe insertion index.
WHAT THE OUTPUT SHOWS:
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
WORKFLOW: Step 1: Call this function Step 2: Note the "total_length" value Step 3: Use an index < total_length for table insertion Step 4: Create your table
Args: user_google_email: User's Google email address document_id: ID of the document to inspect detailed: Whether to return detailed structure information
Returns: str: JSON string containing document structure and safe insertion indices
Inputs: user_google_email (required), document_id (required), detailed. Returns: result
link_local_fileA
Link a local file to a Google Drive file ID for synchronization.
Args: user_google_email: The user's Google email address. Required. local_path: The relative path to the local file (e.g. "docs/notes.md"). file_id: The Google Drive file ID or its search alias (e.g. "A"). dry_run: If True (default), preview link operation without updating local sync metadata.
Inputs: user_google_email (required), local_path (required), file_id (required), dry_run. Returns: result
list_calendarsA
Retrieves a list of calendars accessible to the authenticated user.
Args: user_google_email (str): The user's Google email address. Required.
Returns: str: A formatted list of the user's calendars (summary, ID, primary status).
Inputs: user_google_email (required). Returns: result
list_deploymentsA
List deployments for an Apps Script project.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. page_size: Number of results to return. Defaults to 50. page_token: Optional pagination token.
Returns: str: Deployment list summary.
Inputs: user_google_email (required), script_id (required), page_size, page_token. Returns: result
list_docs_in_folderC
Lists Google Docs within a specific Drive folder.
Returns: str: A formatted list of Google Docs in the specified folder.
Inputs: user_google_email (required), folder_id, page_size. Returns: result
list_drive_itemsA
Lists files and folders, supporting shared drives.
If drive_id is specified, lists items within that shared drive. folder_id is then relative to that drive (or use drive_id as folder_id for root).
If drive_id is not specified, lists items from user's "My Drive" and accessible shared drives (if include_items_from_all_drives is True).
Args:
user_google_email (str): The user's Google email address. Required.
folder_id (str): The ID of the Google Drive folder. Defaults to 'root'. For a shared drive, this can be the shared drive's ID to list its root, or a folder ID within that shared drive.
page_size (int): The maximum number of items to return. Defaults to 100.
drive_id (Optional[str]): ID of the shared drive. If provided, the listing is scoped to this drive.
include_items_from_all_drives (bool): Whether items from all accessible shared drives should be included if drive_id is not set. Defaults to True.
corpora (Optional[str]): Corpus to query ('user', 'drive', 'allDrives'). If drive_id is set and corpora is None, 'drive' is used. If None and no drive_id, API defaults apply.
Returns: str: A formatted list of files/folders in the specified folder.
Inputs: user_google_email (required), folder_id, page_size, drive_id, +2 more. Returns: result
list_form_responsesA
List a form's responses.
Args: user_google_email (str): The user's Google email address. Required. form_id (str): The ID of the form. page_size (int): Maximum number of responses to return. Defaults to 10. page_token (Optional[str]): Token for retrieving next page of results.
Returns: str: List of responses with basic details and pagination info.
Inputs: user_google_email (required), form_id (required), page_size, page_token. Returns: result
list_gmail_filtersA
Lists all Gmail filters configured in the user's mailbox.
Args: user_google_email (str): The user's Google email address. Required.
Returns: str: A formatted list of filters with their criteria and actions.
Inputs: user_google_email (required). Returns: result
list_gmail_labelsA
Lists all labels in the user's Gmail account.
Args: user_google_email (str): The user's Google email address. Required.
Returns: str: A formatted list of all labels with their IDs, names, and types.
Inputs: user_google_email (required). Returns: result
list_script_processesA
List Apps Script processes.
If script_id is provided, uses script-specific process listing.
Otherwise, uses user-wide process listing.
Args: user_google_email: The user's Google email address. Required. script_id: Optional script ID for script-specific listing. script_process_filter_json: Optional JSON object for script process filter. user_process_filter_json: Optional JSON object for user process filter. page_size: Number of results to return. Defaults to 50. page_token: Optional pagination token.
Returns: str: Process list summary.
Inputs: user_google_email (required), script_id, script_process_filter_json, user_process_filter_json, +2 more. Returns: result
list_script_projectsA
List standalone Apps Script projects from Google Drive.
Limitation: container-bound scripts are excluded by design because this tool
is Drive-backed and only lists files of mimeType application/vnd.google-apps.script.
Args: user_google_email: The user's Google email address. Required. page_size: Number of results to return. Defaults to 50. page_token: Optional pagination token.
Returns: str: Formatted standalone Apps Script Drive file list.
Inputs: user_google_email (required), page_size, page_token. Returns: result
list_spacesB
Lists Google Chat spaces (rooms and direct messages) accessible to the user.
Returns: str: A formatted list of Google Chat spaces accessible to the user.
Inputs: user_google_email (required), page_size, space_type. Returns: result
list_spreadsheetsA
Lists spreadsheets from Google Drive that the user has access to.
Args: user_google_email (str): The user's Google email address. Required. max_results (int): Maximum number of spreadsheets to return. Defaults to 25.
Returns: str: A formatted list of spreadsheet files (name, ID, modified time).
Inputs: user_google_email (required), max_results. Returns: result
list_task_listsA
List all task lists for the user.
Args: user_google_email (str): The user's Google email address. Required. max_results (int): Maximum number of task lists to return (default: 1000, max: 1000). page_token (Optional[str]): Token for pagination.
Returns: str: List of task lists with their IDs, titles, and details.
Inputs: user_google_email (required), max_results, page_token. Returns: result
list_tasksA
List all tasks in a specific task list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to retrieve tasks from. max_results (int): Maximum number of tasks to return. (default: 20, max: 10000). page_token (Optional[str]): Token for pagination. show_completed (bool): Whether to include completed tasks (default: True). Note that show_hidden must also be true to show tasks completed in first party clients, such as the web UI and Google's mobile apps. show_deleted (bool): Whether to include deleted tasks (default: False). show_hidden (bool): Whether to include hidden tasks (default: False). show_assigned (bool): Whether to include assigned tasks (default: False). completed_max (Optional[str]): Upper bound for completion date (RFC 3339 timestamp). completed_min (Optional[str]): Lower bound for completion date (RFC 3339 timestamp). due_max (Optional[str]): Upper bound for due date (RFC 3339 timestamp). due_min (Optional[str]): Lower bound for due date (RFC 3339 timestamp). updated_min (Optional[str]): Lower bound for last modification time (RFC 3339 timestamp).
Returns: str: List of tasks with their details.
Inputs: user_google_email (required), task_list_id (required), max_results, page_token, +9 more. Returns: result
list_versionsB
List versions for an Apps Script project.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. page_size: Number of results to return. Defaults to 50. page_token: Optional pagination token.
Returns: str: Version list summary.
Inputs: user_google_email (required), script_id (required), page_size, page_token. Returns: result
manage_gmail_labelA
Manages Gmail labels: create, update, or delete labels.
Args: user_google_email (str): The user's Google email address. Required. action (Literal["create", "update", "delete"]): Action to perform on the label. name (Optional[str]): Label name. Required for create, optional for update. label_id (Optional[str]): Label ID. Required for update and delete operations. label_list_visibility (Literal["labelShow", "labelHide"]): Whether the label is shown in the label list. message_list_visibility (Literal["show", "hide"]): Whether the label is shown in the message list. dry_run (bool): If True, preview label changes without applying mutations.
Returns: str: Confirmation message of the label operation.
Inputs: user_google_email (required), action (required), name, label_id, +3 more. Returns: result
mirror_drive_folderA
Recursively download a Google Drive folder to a local directory. Maintains directory structure and links downloaded files for future sync.
Args: user_google_email: The user's Google email address. Required. local_parent_dir: The local directory to download into. Created if missing. folder_query: The Name or ID of the Drive folder. recursive: Whether to download subfolders. dry_run: If True (default), return planned mirror operation without writing local files.
Inputs: user_google_email (required), local_parent_dir (required), folder_query (required), recursive, +1 more. Returns: result
modify_doc_textA
Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.
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) dry_run: When True (default), return planned mutations without executing them
Returns: str: Confirmation message with operation details
Inputs: user_google_email (required), document_id (required), start_index (required), end_index, +9 more. Returns: result
modify_eventA
Modifies an existing event.
Args: user_google_email (str): The user's Google email address. Required. event_id (str): The ID of the event to modify. calendar_id (str): Calendar ID (default: 'primary'). summary (Optional[str]): New event title. start_time (Optional[str]): New start time (RFC3339, e.g., "2023-10-27T10:00:00-07:00" or "2023-10-27" for all-day). end_time (Optional[str]): New end time (RFC3339, e.g., "2023-10-27T11:00:00-07:00" or "2023-10-28" for all-day). description (Optional[str]): New event description. location (Optional[str]): New event location. attendees (Optional[Union[List[str], List[Dict[str, Any]]]]): Attendees as email strings or objects with metadata. Supports: ["email@example.com"] or [{"email": "email@example.com", "responseStatus": "accepted", "organizer": true, "optional": true}]. When using objects, existing metadata (responseStatus, organizer, optional) is preserved. New attendees default to responseStatus="needsAction". timezone (Optional[str]): New timezone (e.g., "America/New_York"). add_google_meet (Optional[bool]): Whether to add or remove Google Meet video conference. If True, adds Google Meet; if False, removes it; if None, leaves unchanged. reminders (Optional[Union[str, List[Dict[str, Any]]]]): JSON string or list of reminder objects to replace existing reminders. Each should have 'method' ("popup" or "email") and 'minutes' (0-40320). Max 5 reminders. Example: '[{"method": "popup", "minutes": 15}]' or [{"method": "popup", "minutes": 15}] use_default_reminders (Optional[bool]): Whether to use calendar's default reminders. If specified, overrides current reminder settings. transparency (Optional[str]): Event transparency for busy/free status. "opaque" shows as Busy, "transparent" shows as Available/Free. If None, preserves existing transparency setting. visibility (Optional[str]): Event visibility. "default" uses calendar default, "public" is visible to all, "private" is visible only to attendees, "confidential" is same as private (legacy). If None, preserves existing visibility setting. color_id (Optional[str]): Event color ID (1-11). If None, preserves existing color. dry_run (bool): If True, returns a preview and does not modify the event. Defaults to True.
Returns: str: Confirmation message of the successful event modification with event link.
Inputs: user_google_email (required), event_id (required), calendar_id, summary, +13 more. Returns: result
modify_gmail_message_labelsA
Adds or removes labels from a Gmail message. To archive an email, remove the INBOX label. To delete an email, add the TRASH label.
Args: user_google_email (str): The user's Google email address. Required. message_id (str): The ID of the message to modify. add_label_ids (Optional[List[str]]): List of label IDs to add to the message. remove_label_ids (Optional[List[str]]): List of label IDs to remove from the message. dry_run (bool): If True, preview label changes without mutating the message.
Returns: str: Confirmation message of the label changes applied to the message.
Inputs: user_google_email (required), message_id (required), add_label_ids, remove_label_ids, +1 more. Returns: result
modify_sheet_valuesA
Modifies values in a specific range of a Google Sheet - can write, update, or clear values.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (str): The range to modify (e.g., "Sheet1!A1:D10", "A1:D10"). Required. values (Optional[Union[str, List[List[str]]]]): 2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True. value_input_option (str): How to interpret input values ("RAW" or "USER_ENTERED"). Defaults to "USER_ENTERED". clear_values (bool): If True, clears the range instead of writing values. Defaults to False.
Returns: str: Confirmation message of the successful modification operation.
Inputs: user_google_email (required), spreadsheet_id (required), range_name (required), values, +3 more. Returns: result
move_taskA
Move a task to a different position or parent within the same list, or to a different list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the current task list containing the task. task_id (str): The ID of the task to move. parent (Optional[str]): New parent task ID (for making it a subtask). previous (Optional[str]): Previous sibling task ID (for positioning). destination_task_list (Optional[str]): Destination task list ID (for moving between lists). dry_run (bool): When True (default), return planned mutation without executing.
Returns: str: Confirmation message with updated task details.
Inputs: user_google_email (required), task_list_id (required), task_id (required), parent, +3 more. Returns: result
read_document_commentsC
Read all comments from a Google Document.
Inputs: user_google_email (required), document_id (required). Returns: result
read_presentation_commentsC
Read all comments from a Google Presentation.
Inputs: user_google_email (required), presentation_id (required). Returns: result
read_sheet_valuesA
Reads values from a specific range in a Google Sheet.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (str): The range to read (e.g., "Sheet1!A1:D10", "A1:D10"). Defaults to "A1:Z1000".
Returns: str: The formatted values from the specified range.
Inputs: user_google_email (required), spreadsheet_id (required), range_name. Returns: result
read_spreadsheet_commentsB
Read all comments from a Google Spreadsheet.
Inputs: user_google_email (required), spreadsheet_id (required). Returns: result
remove_drive_permissionA
Removes a permission from a Google Drive file or folder, revoking access.
Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file or folder. Required. permission_id (str): The ID of the permission to remove (from get_drive_file_permissions). Required. dry_run (bool): If True, returns a preview and does not remove permissions. Defaults to True.
Returns: str: Confirmation of the removed permission.
Inputs: user_google_email (required), file_id (required), permission_id (required), dry_run. Returns: result
reply_to_document_commentB
Reply to a specific comment in a Google Document.
Inputs: user_google_email (required), document_id (required), comment_id (required), reply_content (required). Returns: result
reply_to_presentation_commentC
Reply to a specific comment in a Google Presentation.
Inputs: user_google_email (required), presentation_id (required), comment_id (required), reply_content (required). Returns: result
reply_to_spreadsheet_commentC
Reply to a specific comment in a Google Spreadsheet.
Inputs: user_google_email (required), spreadsheet_id (required), comment_id (required), reply_content (required). Returns: result
resolve_document_commentC
Resolve a comment in a Google Document.
Inputs: user_google_email (required), document_id (required), comment_id (required). Returns: result
resolve_presentation_commentC
Resolve a comment in a Google Presentation.
Inputs: user_google_email (required), presentation_id (required), comment_id (required). Returns: result
resolve_spreadsheet_commentB
Resolve a comment in a Google Spreadsheet.
Inputs: user_google_email (required), spreadsheet_id (required), comment_id (required). Returns: result
run_script_functionB
Execute a function in an Apps Script project.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. function_name: Target function name. parameters_json: Optional JSON list of function parameters. dev_mode: Whether to run in development mode. Defaults to False. dry_run: Preview execution without calling API. Defaults to True.
Returns: str: Execution preview or result.
Inputs: user_google_email (required), script_id (required), function_name (required), parameters_json, +2 more. Returns: result
search_customA
Performs a search using Google Custom Search JSON API.
Args: user_google_email (str): The user's Google email address. Required. q (str): The search query. Required. num (int): Number of results to return (1-10). Defaults to 10. start (int): The index of the first result to return (1-based). Defaults to 1. safe (Literal["active", "moderate", "off"]): Safe search level. Defaults to "off". search_type (Optional[Literal["image"]]): Search for images if set to "image". site_search (Optional[str]): Restrict search to a specific site/domain. site_search_filter (Optional[Literal["e", "i"]]): Exclude ("e") or include ("i") site_search results. date_restrict (Optional[str]): Restrict results by date (e.g., "d5" for past 5 days, "m3" for past 3 months). file_type (Optional[str]): Filter by file type (e.g., "pdf", "doc"). language (Optional[str]): Language code for results (e.g., "lang_en"). country (Optional[str]): Country code for results (e.g., "countryUS").
Returns: str: Formatted search results including title, link, and snippet for each result.
Inputs: user_google_email (required), q (required), num, start, +8 more. Returns: result
search_custom_siterestrictA
Performs a search restricted to specific sites using Google Custom Search.
Args: user_google_email (str): The user's Google email address. Required. q (str): The search query. Required. sites (List[str]): List of sites/domains to search within. num (int): Number of results to return (1-10). Defaults to 10. start (int): The index of the first result to return (1-based). Defaults to 1. safe (Literal["active", "moderate", "off"]): Safe search level. Defaults to "off".
Returns: str: Formatted search results from the specified sites.
Inputs: user_google_email (required), q (required), sites (required), num, +2 more. Returns: result
search_docsC
Searches for Google Docs by name using Drive API (mimeType filter).
Returns: str: A formatted list of Google Docs matching the search query.
Inputs: user_google_email (required), query (required), page_size. Returns: result
search_drive_filesA
Searches for files and folders within a user's Google Drive, including shared drives.
Args:
user_google_email (str): The user's Google email address. Required.
query (str): The search query string. Supports Google Drive search operators.
page_size (int): The maximum number of files to return. Defaults to 10.
drive_id (Optional[str]): ID of the shared drive to search. If None, behavior depends on corpora and include_items_from_all_drives.
include_items_from_all_drives (bool): Whether shared drive items should be included in results. Defaults to True. This is effective when not specifying a drive_id.
corpora (Optional[str]): Bodies of items to query (e.g., 'user', 'domain', 'drive', 'allDrives').
If 'drive_id' is specified and 'corpora' is None, it defaults to 'drive'.
Otherwise, Drive API default behavior applies. Prefer 'user' or 'drive' over 'allDrives' for efficiency.
Returns: str: A formatted list of found files/folders with their details (ID, name, type, size, modified time, link).
Inputs: user_google_email (required), query (required), page_size, drive_id, +2 more. Returns: result
search_gmail_messagesA
Searches messages in a user's Gmail account based on a query. Returns both Message IDs and Thread IDs for each found message, along with Gmail web interface links for manual verification. Supports pagination via page_token parameter.
Args: query (str): The search query. Supports standard Gmail search operators. user_google_email (str): The user's Google email address. Required. page_size (int): The maximum number of messages to return. Defaults to 10. page_token (Optional[str]): Token for retrieving the next page of results. Use the next_page_token from a previous response.
Returns: str: LLM-friendly structured results with Message IDs, Thread IDs, and clickable Gmail web interface URLs for each found message. Includes pagination token if more results are available.
Inputs: query (required), user_google_email (required), page_size, page_token. Returns: result
search_messagesB
Searches for messages in Google Chat spaces by text content.
Returns: str: A formatted list of messages matching the search query.
Inputs: user_google_email (required), query (required), space_id, page_size. Returns: result
send_gmail_messageA
Sends an email using the user's Gmail account. Supports both new emails and replies.
Args: to (str): Recipient email address. subject (str): Email subject. body (str): Email body content. body_format (Literal['plain', 'html']): Email body format. Defaults to 'plain'. cc (Optional[str]): Optional CC email address. bcc (Optional[str]): Optional BCC email address. user_google_email (str): The user's Google email address. Required. thread_id (Optional[str]): Optional Gmail thread ID to reply within. When provided, sends a reply. in_reply_to (Optional[str]): Optional Message-ID of the message being replied to. Used for proper threading. references (Optional[str]): Optional chain of Message-IDs for proper threading. Should include all previous Message-IDs.
Returns: str: Confirmation message with the sent email's message ID.
Examples: # Send a new email send_gmail_message(to="user@example.com", subject="Hello", body="Hi there!")
# Send an HTML email
send_gmail_message(
to="user@example.com",
subject="Hello",
body="<strong>Hi there!</strong>",
body_format="html"
)
# Send an email with CC and BCC
send_gmail_message(
to="user@example.com",
cc="manager@example.com",
bcc="archive@example.com",
subject="Project Update",
body="Here's the latest update..."
)
# Send a reply
send_gmail_message(
to="user@example.com",
subject="Re: Meeting tomorrow",
body="Thanks for the update!",
thread_id="thread_123",
in_reply_to="<message123@gmail.com>",
references="<original@gmail.com> <message123@gmail.com>"
)Inputs: user_google_email (required), to (required), subject (required), body (required), +7 more. Returns: result
send_messageC
Sends a message to a Google Chat space.
Args: dry_run (bool): If True, preview the message send without mutating Chat.
Returns: str: Confirmation message with sent message details.
Inputs: user_google_email (required), space_id (required), message_text (required), thread_key, +1 more. Returns: result
set_publish_settingsA
Updates the publish settings of a form.
Args: user_google_email (str): The user's Google email address. Required. form_id (str): The ID of the form to update publish settings for. publish_as_template (bool): Whether to publish as a template. Defaults to False. require_authentication (bool): Whether to require authentication to view/submit. Defaults to False. dry_run (bool): If True, preview the update without mutating the form.
Returns: str: Confirmation message of the successful publish settings update.
Inputs: user_google_email (required), form_id (required), publish_as_template, require_authentication, +1 more. Returns: result
setup_google_auth_clientsA
Ensure auth_clients.json exists for single-MCP multi-client auth routing.
Inputs: no named parameters. Returns: result
start_google_authA
Manually initiate Google OAuth authentication flow.
NOTE: This tool should typically NOT be called directly. The authentication system automatically handles credential checks and prompts for authentication when needed. Only use this tool if:
You need to re-authenticate with different credentials
You want to proactively authenticate before using other tools
The automatic authentication flow failed and you need to retry
In most cases, simply try calling the Google Workspace tool you need - it will automatically handle authentication if required.
Inputs: service_name (required), user_google_email. Returns: result
transfer_drive_ownershipA
Transfers ownership of a Google Drive file or folder to another user.
This is an irreversible operation. The current owner will become an editor. Only works within the same Google Workspace domain or for personal accounts.
Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file or folder to transfer. Required. new_owner_email (str): Email address of the new owner. Required. move_to_new_owners_root (bool): If True, moves the file to the new owner's My Drive root. Defaults to False. dry_run (bool): If True, returns a preview and does not transfer ownership. Defaults to True.
Returns: str: Confirmation of the ownership transfer.
Inputs: user_google_email (required), file_id (required), new_owner_email (required), move_to_new_owners_root, +1 more. Returns: result
update_conditional_formattingA
Updates an existing conditional formatting rule by index on a sheet.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (Optional[str]): A1-style range to apply the updated rule (optionally with sheet name). If omitted, existing ranges are preserved. rule_index (int): Index of the rule to update (0-based). condition_type (Optional[str]): Sheets condition type. If omitted, the existing rule's type is preserved. condition_values (Optional[Union[str, List[Union[str, int, float]]]]): Values for the condition. background_color (Optional[str]): Hex background color when condition matches. text_color (Optional[str]): Hex text color when condition matches. sheet_name (Optional[str]): Sheet name to locate the rule when range_name is omitted. Defaults to first sheet. gradient_points (Optional[Union[str, List[dict]]]): If provided, updates the rule to a gradient color scale using these points. dry_run (bool): When True (default), return planned update details without mutating the sheet.
Returns: str: Confirmation of the updated rule and the current rule state.
Inputs: user_google_email (required), spreadsheet_id (required), rule_index (required), range_name, +7 more. Returns: result
update_deploymentA
Update an Apps Script deployment.
Args: user_google_email: The user's Google email address. Required. script_id: The Apps Script project ID. deployment_id: The deployment ID to update. description: Updated deployment description. version_number: Optional target version number. dry_run: Preview deployment update without mutation. Defaults to True.
Returns: str: Confirmation of preview or update.
Inputs: user_google_email (required), script_id (required), deployment_id (required), description (required), +2 more. Returns: result
update_drive_fileA
Updates metadata and properties of a Google Drive file.
Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file to update. Required. name (Optional[str]): New name for the file. description (Optional[str]): New description for the file. mime_type (Optional[str]): New MIME type (note: changing type may require content upload). add_parents (Optional[str]): Comma-separated folder IDs to add as parents. remove_parents (Optional[str]): Comma-separated folder IDs to remove from parents. starred (Optional[bool]): Whether to star/unstar the file. trashed (Optional[bool]): Whether to move file to/from trash. writers_can_share (Optional[bool]): Whether editors can share the file. copy_requires_writer_permission (Optional[bool]): Whether copying requires writer permission. properties (Optional[dict]): Custom key-value properties for the file. dry_run (bool): If True, returns a preview and does not update the file. Defaults to True.
Returns: str: Confirmation message with details of the updates applied.
Inputs: user_google_email (required), file_id (required), name, description, +9 more. Returns: result
update_drive_permissionB
Updates an existing permission on a Google Drive file or folder.
Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file or folder. Required. permission_id (str): The ID of the permission to update (from get_drive_file_permissions). Required. role (Optional[str]): New role - 'reader', 'commenter', or 'writer'. If not provided, role unchanged. expiration_time (Optional[str]): Expiration time in RFC 3339 format (e.g., "2025-01-15T00:00:00Z"). Set or update when permission expires. dry_run (bool): If True, returns a preview and does not update permissions. Defaults to True.
Returns: str: Confirmation with updated permission details.
Inputs: user_google_email (required), file_id (required), permission_id (required), role, +2 more. Returns: result
update_google_docA
Upload content from a local file to its linked Google Doc. SAFETY: Defaults to dry_run=True. Usage must explicitly set dry_run=False to apply changes.
Args: user_google_email: The user's Google email address. Required. local_path: Path to the local file. force: If True, overwrite even if the remote file has changed since last sync. dry_run: If True (default), return a diff of changes instead of updating. Set to False to apply.
Inputs: user_google_email (required), local_path (required), force, dry_run. Returns: result
update_script_contentB
Update Apps Script project files.
Args:
user_google_email: The user's Google email address. Required.
script_id: The Apps Script project ID.
files_json: JSON list of file objects (name, type, source).
dry_run: Preview content update without mutation. Defaults to True.
Returns: str: Confirmation of preview or update.
Inputs: user_google_email (required), script_id (required), files_json (required), dry_run. Returns: result
update_taskA
Update an existing task.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list containing the task. task_id (str): The ID of the task to update. title (Optional[str]): New title for the task. notes (Optional[str]): New notes/description for the task. status (Optional[str]): New status ("needsAction" or "completed"). due (Optional[str]): New due date in RFC 3339 format. dry_run (bool): When True (default), return planned mutation without executing.
Returns: str: Confirmation message with updated task details.
Inputs: user_google_email (required), task_list_id (required), task_id (required), title, +4 more. Returns: result
update_task_listB
Update an existing task list.
Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to update. title (str): The new title for the task list. dry_run (bool): If True, preview the update without mutating the task list.
Returns: str: Confirmation message with updated task list details.
Inputs: user_google_email (required), task_list_id (required), title (required), dry_run. Returns: result
upload_folderA
Recursively upload a local folder to Google Drive using BFS traversal. More robust than recursion - handles deep trees and reports errors gracefully.
Args: user_google_email: The user's Google email address. Required. local_path: Path to the local folder to upload. parent_folder_id: Optional parent folder ID in Drive. If None, uploads to root. dry_run: If True (default), return planned upload summary without mutating Drive or sync metadata.
Inputs: user_google_email (required), local_path (required), parent_folder_id, dry_run. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 126 tools
Each tool targets a specific Google Workspace service and action, with clear names like 'create_doc', 'send_gmail_message', etc. There is no functional overlap even among similar tools across different services, as they are prefixed by service name.
The predominant naming convention is verb_noun snake_case, consistent across most tools. However, some tools deviate slightly, such as 'setup_google_auth_clients' and 'debug_table_structure', and there are batch variants that add 'batch_' prefix inconsistently.
With 126 tools, the count is excessively high for a single MCP server, including many specialized functions (e.g., multiple debug and batch tools). This volume makes it difficult for an agent to efficiently navigate and select the right tool, despite good naming.
The server covers most core Google Workspace services (Mail, Calendar, Drive, Docs, Sheets, Slides, Forms, Tasks, Chat, Apps Script, Search) with robust CRUD and lifecycle operations. Minor gaps exist, such as missing delete for spreadsheets or list for presentations, but overall coverage is very strong.
Maintenance
Related MCP Connectors
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Hosted MCP for Google Workspace, Atlassian and Notion: one OAuth, per-user accounts, write access.
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Your Gmail, Calendar, Drive, GitHub, Oura, wallet and confirmed profile facts in any MCP client.
Related MCP Servers
- AlicenseBqualityBmaintenanceGoogle Workspace MCP Server11972,429 PyPI3,493PythonMIT
- AlicenseAqualityDmaintenanceMCP server for Google Workspace APIs - Docs, Sheets, Drive, Gmail, and Calendar. Enables reading, creating, and editing Google Docs and Sheets, managing comments, reading emails, and viewing calendar events.3422 npm17MIT
- AlicenseNot gradedqualityBmaintenanceA full-featured Model Context Protocol server that gives AI assistants real-time access to Google Workspace services including Drive, Gmail, Calendar, Sheets, Docs, and Apps Script.10MIT
- AlicenseBqualityDmaintenanceComprehensive Google Workspace MCP server with Gmail, Drive, Calendar, and Contacts integration.2615 npmMIT