start_google_auth
Start Google Auth
Manually initiate Google OAuth authentication flow.
NOTE: This is a legacy OAuth 2.0 tool and is disabled when OAuth 2.1 is enabled.
The authentication system automatically handles credential checks and prompts for
authentication when needed. Only use this tool if:
1. You need to re-authenticate with different credentials
2. You want to proactively authenticate before using other tools
3. 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.
Parametersservice_namerequireduser_google_email
search_gmail_messages
Search Gmail Messages
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.
Parametersqueryrequiredpage_sizepage_tokeninclude_headersuser_google_emailrequired
get_gmail_message_content
Get Gmail Message Content
Retrieves the full content (subject, sender, recipients, body) of a specific Gmail message.
Set page_offset=0 to read the complete rendered body, excluding attachments and
attached messages, as JSON pages of at most page_size characters. Follow
next_offset until complete=true, passing body_sha256 as expected_sha256 and
keeping body_format and include_links unchanged.
Bodies are returned inline and truncated at 20,000 characters. Set full=True to
get the complete, untruncated message instead: it is exported to storage and the
response carries a short-lived download URL (HTTP transport) or file path (stdio
transport) rather than the body, so large messages never stream through the model
context. Stateless deployments without GCS staging have no storage, so there
full=True returns the untruncated body inline; with GCS staging configured it
returns a signed download URL like any other HTTP deployment.
Parametersfullformatpage_sizemessage_idrequiredbody_formatpage_offsetinclude_linksexpected_sha256include_headersuser_google_emailrequired
get_gmail_messages_content_batch
Get Gmail Messages Content Batch
Retrieves the content of multiple Gmail messages in a single batch request.
Supports up to 25 messages per batch to prevent SSL connection exhaustion.
Parametersformatbody_formatmessage_idsrequiredinclude_linksuser_google_emailrequired
get_gmail_attachment_content
Get Gmail Attachment Content
Downloads an email attachment and saves it to local disk.
In stdio mode, returns the local file path for direct access.
In HTTP mode, returns a temporary download URL (valid for 1 hour).
May re-fetch message metadata to resolve filename and MIME type.
Parametersmessage_idrequiredattachment_idrequiredreturn_base64attachment_indexuser_google_emailrequired
send_gmail_message
Send Gmail Message
Sends an email using the user's Gmail account. Supports new emails, replies, and
forwards, with optional attachments. Supports Gmail's "Send As" feature to send
from configured alias addresses.
To forward an existing message, pass forward_message_id. The original subject,
body (quoted with a "Forwarded message" header), and attachments are carried over.
In forward mode, body (if any) is prepended as a note and subject is optional.
Threading, reply, and signature options do not apply when forwarding.
THIS TOOL SENDS IMMEDIATELY AND CANNOT SCHEDULE. Gmail's REST API exposes no
send-time parameter; Schedule send is a web-UI feature with no API equivalent,
so no argument to this tool can defer delivery. Never tell a user a message
was scheduled. For "prepare now, deliver later", create a draft with
draft_gmail_message. An external scheduler must retain the message data to
create and send a new message via send_gmail_message at the chosen time, or
call users.drafts.send with the draft ID returned by draft_gmail_message.
Alternatively, let the user schedule that draft in the Gmail UI.
Parameterscctobccbodysubjectdirectionfrom_namereply_allthread_idfrom_emailreferencesattachments+7 more
draft_gmail_message
Draft Gmail Message
Creates a draft email in the user's Gmail account. Supports new, reply, and forward
drafts with optional attachments. Supports Gmail's "Send As" feature to draft from
configured alias addresses.
To save a forward as a draft for review, pass forward_message_id. The original
subject, body (quoted with a "Forwarded message" header), and attachments are
carried over. In forward mode, body (if any) is prepended as a note, subject is
optional, and threading, reply, and signature options do not apply.
SCHEDULED SEND IS NOT AVAILABLE. Gmail's REST API exposes no send-time
parameter; the Schedule send feature is web-UI only, and a message cannot be
placed in the Scheduled folder through the API. Do not claim a message was
scheduled. To deliver at a chosen time, create a draft with
draft_gmail_message. An external scheduler must retain the message data to
create and send a new message via send_gmail_message then, or call
users.drafts.send with the draft ID returned by draft_gmail_message.
Alternatively, let the user schedule the draft in the Gmail UI.
Parameterscctobccbodysubjectdirectionfrom_namereply_allthread_idfrom_emailreferencesattachments+7 more
get_gmail_thread_content
Get Gmail Thread Content
Retrieves the complete content of a Gmail conversation thread, including all messages.
Optionally also returns structured ownership analysis so a caller can
determine who sent the last message and who owes whom a response without
re-parsing the formatted string or making a second tool call.
Parametersthread_idrequiredbody_formatinclude_linksinclude_analysisuser_google_emailrequired
get_gmail_threads_content_batch
Get Gmail Threads Content Batch
Retrieves the content of multiple Gmail threads in a single batch request.
Supports up to 25 threads per batch to prevent SSL connection exhaustion.
Parametersthread_idsrequiredbody_formatinclude_linksuser_google_emailrequired
list_gmail_labels
List Gmail Labels
Lists labels in the user's Gmail account.
Parametersprefixcompactinclude_systemuser_google_emailrequired
manage_gmail_label
Manage Gmail Label
Manages Gmail labels: create, update, or delete labels.
Parametersnameactionrequiredlabel_idtext_colorclear_colorbackground_coloruser_google_emailrequiredlabel_list_visibilitymessage_list_visibility
list_gmail_filters
List Gmail Filters
Lists all Gmail filters configured in the user's mailbox.
Parametersuser_google_emailrequired
manage_gmail_filter
Manage Gmail Filter
Manages Gmail filters: create, delete, update, and apply to existing mail.
- update: Gmail has no filter update API, so the filter is recreated (new
one first, then the old one is deleted) and its ID changes. A passed
criteria or filter_action replaces that whole object; omit one to keep
the old filter's.
- apply: runs a filter's label actions on mail ALREADY in the mailbox
(Gmail filters only act on new mail). Only matching messages change,
not whole conversations as in the web UI. Use filter_id, or criteria +
filter_action for an ad-hoc run. Forwarding is never applied. Use
dry_run=true first to see the search query and the match count.
Needs the gmail.modify scope in addition to gmail.settings.basic.
Parametersactionrequireddry_runcriteriafilter_idmax_messagesfilter_actionuser_google_emailrequired
modify_gmail_message_labels
Modify Gmail Message Labels
Adds or removes labels from a Gmail message.
To archive an email, remove the INBOX label.
To delete an email, add the TRASH label.
Parametersmessage_idrequiredadd_label_idsremove_label_idsuser_google_emailrequired
batch_modify_gmail_message_labels
Batch Modify Gmail Message Labels
Adds or removes labels on many Gmail messages, or on every message of whole
conversations via thread_ids.
message_ids are sent in one users.messages.batchModify call (Gmail accepts
up to 1000 ids per call). That endpoint returns no per-message result and
silently ignores ids it does not recognise, so by default the messages are
read back afterwards to report which ids actually changed.
thread_ids are modified one at a time with users.threads.modify, e.g.
archive a conversation with remove_label_ids=["INBOX"] or mark it read with
remove_label_ids=["UNREAD"]. Each thread reports its own outcome.
message_ids and thread_ids can be combined; at least one is required, as is
at least one of add_label_ids or remove_label_ids.
Parametersverifythread_idsmessage_idsadd_label_idsremove_label_idsuser_google_emailrequired
search_drive_files
Search Drive Files
Searches for files and folders within a user's Google Drive, including shared drives.
Parametersqueryrequiredcorporadetaileddrive_idorder_byfile_typepage_sizepage_tokeninclude_trasheduser_google_emailrequiredinclude_items_from_all_drives
get_drive_file_content
Get Drive File Content
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.
• PDFs → text extracted with pypdf when possible; scanned/image-only PDFs
fall back to a download hint.
• Images (PNG, JPEG, GIF, WebP) → returned as MCP image content after the
metadata header. SVG → returned as its markup; raster images it embeds
as base64 are attached as image content, numbered to match their place
in the markup. BMP and TIFF → base64 text, or a download hint when over
the default page size.
• Any other file → downloaded; tries UTF-8 decode, else notes binary.
Parametersoffsetfile_idrequiredfull_contentuser_google_emailrequired
get_drive_file_download_url
Get Drive File Download URL
Downloads a Google Drive file and saves it to local disk.
In stdio mode, returns the local file path for direct access.
In HTTP mode, returns a temporary download URL (valid for 1 hour).
In stateless mode (no file storage), returns the file itself as an embedded
resource, up to WORKSPACE_MCP_STATELESS_INLINE_MAX_BYTES (default 10 MiB,
and never more than WORKSPACE_MCP_MAX_FILE_BYTES when that is set).
For Google native files (Docs, Sheets, Slides, Drawings), exports to a useful format:
- Google Docs -> PDF (default) or DOCX if export_format='docx'
- Google Sheets -> XLSX (default), PDF if export_format='pdf', or CSV if export_format='csv'
- Google Slides -> PDF (default) or PPTX if export_format='pptx'
- Google Drawings -> PNG (default), or PDF, JPG or SVG if export_format='pdf', 'jpg' or 'svg'
For other files, downloads the original file format.
Parametersfile_idrequiredexport_formatuser_google_emailrequired
list_drive_items
List Drive Items
Lists files/folders or shared drive containers, 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).
Set `resource_type` to "shared_drives" to list shared drive containers instead of folder contents.
Parametersquerycorporadetaileddrive_idorder_byfile_typefolder_idpage_sizepage_tokenresource_typeuser_google_emailrequiredinclude_organizers+1 more
create_drive_folder
Create Drive Folder
Creates a new folder in Google Drive, supporting creation within shared drives.
Parametersfolder_namerequiredparent_folder_iduser_google_emailrequired
create_drive_file
Create Drive File
Creates a new file in Google Drive, supporting creation within shared drives.
Accepts direct text content, inline base64 bytes, or a fileUrl to fetch content from.
Where local file access is disabled it can instead return an upload URL for the
caller to PUT file bytes to.
This stores the supplied bytes without converting them to Google Docs, Sheets, or
Slides. Use the matching import_to_google_* tool for Google-native conversion.
ParameterscontentfileUrlfile_namerequiredfolder_idmime_typebase64_sha256base64_contentcontent_mime_typeuser_google_emailrequired
import_to_google_doc
Import to Google Doc
Imports a file (Markdown, DOCX, TXT, HTML, RTF, ODT) into Google Docs format with automatic conversion.
Google Drive automatically converts the source file to native Google Docs format,
preserving formatting like headings, lists, bold, italic, etc.
Binary sources may be passed directly as base64_content. On a local server a
file on disk can also be passed by path (preferred for batch operations, so
callers do not need to load full file contents into their context).
Parameterscontentfile_urlfile_namerequiredfile_pathfolder_idbase64_sha256source_formatbase64_contentuser_google_emailrequired
import_to_google_slides
Import to Google Slides
Imports a presentation (PPTX, PPT, ODP) into Google Slides format with automatic conversion.
Google Drive automatically converts the source presentation to native Google Slides format,
preserving slides, layouts, text, and images.
Binary sources may be passed directly as base64_content. On a local server a
file on disk can also be passed by path (preferred for batch operations, so
callers do not need to load full file contents into their context).
Parametersfile_urlfile_namerequiredfile_pathfolder_idbase64_sha256source_formatbase64_contentuser_google_emailrequired
import_to_google_sheets
Import to Google Sheets
Imports a spreadsheet (XLSX, XLS, ODS, CSV, TSV) into Google Sheets format with automatic conversion.
Google Drive automatically converts the source spreadsheet to native Google Sheets format,
preserving rows, columns, sheets, and values.
Binary sources may be passed directly as base64_content. On a local server a
file on disk can also be passed by path (preferred for batch operations, so
callers do not need to load full file contents into their context).
Parameterscontentfile_urlfile_namerequiredfile_pathfolder_idbase64_sha256source_formatbase64_contentuser_google_emailrequired
get_drive_file_permissions
Get Drive File Permissions
Gets detailed metadata about a Google Drive file including sharing permissions,
parent folder IDs, ownership, and lifecycle timestamps.
Parametersfile_idrequireduser_google_emailrequired
check_drive_file_public_access
Check Drive File Public Access
Searches for a file by name and checks if it has public link sharing enabled.
Parametersdrive_idfile_namerequireduser_google_emailrequired
update_drive_file
Update Drive File
Updates metadata, properties, and/or content of a Google Drive file.
Providing new content (inline as ``content``, fetched from ``file_url``, or on a
local server read from a file path) replaces the file's content in place,
preserving the existing file ID, sharing, comments, and links.
For native Google Docs/Sheets/Slides the source is uploaded with its source MIME
type so the Drive API applies the same format conversion as import_to_google_doc
(markdown headings, tables, bold, etc.). For any other file (.md, .txt, .pdf, ...)
there is nothing to convert, so the bytes are written back as-is under the file's
own MIME type. Metadata and content can be updated in a single call.
``mode='append'``/``'prepend'`` splice ``content`` onto the file's existing text
server-side, so only the new text has to be supplied — no need to send the whole
file back to rewrite it.
Drive shortcuts are handled according to the kind of update: supported
resource-local metadata changes (rename, move, trash, star, description, and
custom properties) apply to the supplied shortcut, while content replacement
follows the shortcut and updates its target. To avoid applying metadata to the
wrong resource, a shortcut call cannot combine content with resource-local
metadata. Update the shortcut metadata and target content in separate calls.
Parametersmodenamecontentfile_idrequiredstarredtrashedfile_urlfile_pathmime_typepropertiesadd_parentsdescription+5 more
get_drive_shareable_link
Get Drive Shareable Link
Gets the shareable link for a Google Drive file or folder.
Parametersfile_idrequireduser_google_emailrequired
manage_drive_access
Manage Drive Access
Consolidated tool for managing Google Drive file and folder access permissions.
Supports granting, batch-granting, updating, revoking permissions, and
transferring file ownership -- all through a single entry point.
Parametersroleactionrequiredfile_idrequiredrecipientsshare_typeshare_withemail_messagepermission_idexpiration_timenew_owner_emailsend_notificationuser_google_emailrequired+2 more
copy_drive_file
Copy Drive File
Creates a copy of an existing Google Drive file.
This tool copies the template document to a new location with an optional new name.
The copy maintains all formatting and content from the original file.
Parametersfile_idrequirednew_namecopy_commentsparent_folder_iduser_google_emailrequired
set_drive_file_permissions
Set Drive File Permissions
Sets file-level sharing settings and controls link sharing for a Google Drive file or folder.
This is a high-level tool for the most common permission changes. Use this to toggle
"anyone with the link" access or configure file-level sharing behavior. For managing
individual user/group permissions, use share_drive_file or update_drive_permission instead.
Parametersfile_idrequiredlink_sharinguser_google_emailrequiredwriters_can_sharecopy_requires_writer_permission
list_calendars
List Calendars
Retrieves a list of calendars accessible to the authenticated user.
Parameterspage_tokenmax_resultsuser_google_emailrequired
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.
Parametersquerydetailedevent_idtime_maxtime_minpage_tokencalendar_idmax_resultssingle_eventsuser_google_emailrequiredinclude_attachments
Manages calendar events. Supports creating, updating, deleting, and RSVP.
Parametersactionrequiredsummarycolor_idend_timeevent_idlocationresponsetimezoneattendeesremindersrecurrencestart_time+21 more
manage_out_of_office
Manage Out of Office
Manages Out of Office events on Google Calendar. These special events auto-decline
meeting invitations and set the user's status to "Out of office" across Google Workspace.
Parametersactionrequiredsummaryend_timeevent_idtime_maxtime_mintimezonepage_tokenrecurrencestart_timecalendar_idmax_results+3 more
manage_focus_time
Manage Focus Time
Manages Focus Time events on Google Calendar. These special events auto-decline
meeting invitations and, by default, set the user's chat status to Do Not
Disturb, helping protect blocks of uninterrupted work time.
Parametersactionrequiredsummaryend_timeevent_idtime_maxtime_mintimezonepage_tokenrecurrencestart_timecalendar_idchat_status+5 more
query_freebusy
Query Freebusy
Returns free/busy information for a set of calendars.
Parameterstime_maxrequiredtime_minrequiredcalendar_idsuser_google_emailrequiredgroup_expansion_maxcalendar_expansion_max
create_calendar
Create Calendar
Creates a new secondary Google Calendar.
Parameterssummaryrequiredtimezonedescriptionuser_google_emailrequired
Searches for Google Docs by name using Drive API (mimeType filter).
Parametersqueryrequiredcorporadrive_idpage_sizepage_tokenuser_google_emailrequired
get_doc_content
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.
By default, native Google Docs text is index-aligned with the document:
empty paragraphs are preserved and every non-text element that occupies an
index (inline object, page break, footnote reference, ...) is rendered as one
U+FFFC placeholder per index. The document body starts at index 1, so an
offset n into the text that follows "--- CONTENT ---" is document index n + 1,
and that index can be passed straight to format_text or delete_text. Tables
and multi-tab documents interleave separators, so alignment holds up to the
first table or tab header.
Set preserve_context=True for readable link destinations, internal targets,
smart-chip values, table boundaries, headers, footers, footnotes, and object
context exposed by the Docs API. This output is plain text, not Markdown,
and its offsets must not be used as document editing indices. Comments,
revision history, exact visual layout, and chip details hidden by the API
are not included. Use get_doc_as_markdown for formatting or comments.
Parameterstab_iddocument_idrequiredpreserve_contextuser_google_emailrequiredsuggestions_view_mode
list_docs_in_folder
List Docs in Folder
Lists Google Docs within a specific Drive folder.
Parametersfolder_idpage_sizepage_tokenuser_google_emailrequired
Creates a new Google Doc and optionally inserts initial content.
`content` is inserted as plain text (Markdown is not rendered); use
import_to_google_doc to create a doc from Markdown.
After creation, the document body starts at index 1. A new empty doc
has total length 2 (one section break at index 0, one newline at index 1).
To build a rich document after creation, use batch_update_doc with
insert_text operations using end_of_segment=true to append content
sequentially without calculating indices. Then call inspect_doc_structure
to get exact positions before applying formatting in a separate batch call.
Parameterstitlerequiredcontentfolder_iduser_google_emailrequired
modify_doc_text
Modify Doc Text
Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.
TIP: To append text to the end of the document without calculating indices,
set end_of_segment=true. This avoids index calculation errors.
HEADING MODE: Pass heading instead of start_index to edit the body below a
heading, up to the next heading of equal or shallower level. text is
rendered as Markdown and replaces that body; end_of_segment=true appends
instead. Formatting parameters without text format the whole body.
For ordinary header/footer text, prefer update_doc_headers_footers.
Only pass segment_id when you already have a real header/footer/footnote
segment ID from inspect_doc_structure output. Do not guess IDs such as
"kix.header" or "kix.footer".
Parametersboldtextitalictab_idheadinglink_urlend_indexfont_sizeunderlineclear_linksegment_idsmall_caps+11 more
find_and_replace_doc
Find and Replace Doc
Finds and replaces text throughout a Google Doc. No index calculation required.
This is the safest way to update specific text in a document because it
does not require knowing any indices. Use this tool when you need to:
- Replace placeholder text (e.g., {{TITLE}}) with real content
- Update specific words or phrases throughout the document
- Make targeted text changes without risk of index errors
For building documents from scratch, consider inserting text with unique
placeholders via batch_update_doc, then using this tool to replace them.
Parameterstab_idfind_textrequiredmatch_casedocument_idrequiredreplace_textrequireduser_google_emailrequired
insert_doc_elements
Insert Doc Elements
Inserts structural elements like tables, lists, or page breaks into a Google Doc.
Parametersrowstextindexrequiredcolumnslist_typedocument_idrequiredelement_typerequireduser_google_emailrequired
insert_doc_image
Insert Doc Image
Inserts an image into a Google Doc from Drive or a URL.
Parametersindexrequiredwidthheightdocument_idrequiredimage_sourcerequireduser_google_emailrequired
batch_update_doc
Batch Update Doc
Executes multiple low-level document operations in a single atomic batch update.
For normal header/footer text, prefer update_doc_headers_footers.
Only use create_header_footer here for advanced section-break layouts.
RECOMMENDED WORKFLOW FOR BUILDING DOCUMENTS:
=============================================
To avoid index calculation errors, build documents in phases:
PHASE 1 - INSERT ALL CONTENT (use end_of_segment=true, no index math):
Append text, section breaks, and page breaks sequentially.
Each operation appends to the end of the body. No index needed.
Example batch: [
{"type": "insert_text", "end_of_segment": true, "text": "Report Title\n"},
{"type": "insert_text", "end_of_segment": true, "text": "\nExecutive Summary\n"},
{"type": "insert_text", "end_of_segment": true, "text": "Revenue grew 15%.\n"},
{"type": "insert_section_break", "end_of_segment": true, "section_type": "NEXT_PAGE"},
{"type": "insert_text", "end_of_segment": true, "text": "Detailed Analysis\n"}
]
PHASE 2 - CREATE HEADERS/FOOTERS (if needed):
For normal header/footer text, use update_doc_headers_footers
(it auto-creates if missing and writes the content for you).
Only include create_header_footer operations in a batch when you are
intentionally managing advanced section-break-specific layouts.
Parametersoperationsrequireddocument_idrequireduser_google_emailrequired
inspect_doc_structure
Inspect Doc Structure
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
- Inspecting structure of specific tabs
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
- headers / footers: Real segment IDs and previews for header/footer editing
- tabs: List of available tabs in the document (if no tab_id specified)
- empty_paragraphs: newline-only count, excluding existing/suggested object anchors
- empty_paragraph_ranges: start/end extents, capped at 100
- empty_paragraph_ranges_truncated: whether ranges were omitted
- last_paragraph: is_list_item and is_empty, or null if no body paragraphs
Paragraph statistics cover top-level body paragraphs and appear at the top
level in basic mode or under "statistics" in detailed mode.
Ranges can include required empty paragraphs. Before cleanup, use detailed=true
to check adjacent elements, formatting, and object anchors. Preserve the final
newline and newlines before tables, tables of contents, or section breaks.
If the body ends with an empty paragraph, that paragraph's range has
end == total_length; truncation may omit that range.
WORKFLOW FOR TABLE INSERTION:
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
FORMATTING WORKFLOW:
After inserting all text via batch_update_doc with end_of_segment=true,
call this tool with detailed=true to get exact start_index and end_index
for every paragraph. Use those indices directly in format_text and
update_para
Parameterstab_iddetaileddocument_idrequiredpreview_charsuser_google_emailrequired
create_table_with_data
Create Table with Data
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
Parametersindexrequiredtab_idtable_datarequireddocument_idrequiredheader_rowsbold_headersuser_google_emailrequired
debug_table_structure
Debug Table Structure
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 fill existing cells with modify_doc_text at their insertion_index
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:
1. After creating table → Use this to verify structure
2. Before populating → Use this to plan your data format
3. After population fails → Use this to see what went wrong
4. When debugging → Compare your data array to actual table structure
Parameterstab_iddocument_idrequiredtable_indexuser_google_emailrequired
export_doc_to_pdf
Export Doc to PDF
Exports a Google Doc to PDF format and saves it to Google Drive.
Parametersfolder_iddocument_idrequiredpdf_filenameuser_google_emailrequired
update_paragraph_style
Update Paragraph Style
Apply paragraph-level formatting, heading styles, and/or list formatting to a range in a Google Doc.
This tool can apply named heading styles (H1-H6) for semantic document structure,
create bulleted or numbered lists with nested indentation, and customize paragraph
properties like alignment, spacing, and indentation. All operations can be applied
in a single call.
Parameterstab_idalignmentdirectionend_indexrequiredlist_typeindent_endsegment_idborder_dashdocument_idrequiredspace_abovespace_belowstart_indexrequired+18 more
get_doc_as_markdown
Get Doc as Markdown
Reads a Google Doc and returns it as clean Markdown with optional comment context.
Unlike get_doc_content which returns plain text, this tool preserves document
formatting as Markdown: headings, bold/italic/strikethrough, links, code spans,
ordered/unordered lists with nesting, and tables.
When comments are included (the default), each comment's anchor text — the specific
text the comment was attached to — is preserved, giving full context for the discussion.
Parameterstab_iddocument_idrequiredcomment_modeinclude_colorsinclude_commentsinclude_resolveduser_google_emailrequiredsuggestions_view_mode
manage_doc_tab
Manage Doc Tab
Manage document tabs: create, rename, delete, or populate from Markdown.
Parametersindextitleactionrequiredtab_iddocument_idrequiredmarkdown_textparent_tab_idreplace_existinguser_google_emailrequired
list_spreadsheets
List Spreadsheets
Lists spreadsheets from Google Drive that the user has access to.
Parameterscorporadrive_idpage_tokenmax_resultsuser_google_emailrequired
get_spreadsheet_info
Get Spreadsheet Info
Gets information about a specific spreadsheet including its sheets.
Parametersspreadsheet_idrequireduser_google_emailrequired
read_sheet_values
Read Sheet Values
Reads values from a specific range in a Google Sheet, one line per row:
the sheet row number, then the row's cells separated by tabs.
Parametersrange_nameinclude_notesspreadsheet_idrequiredinclude_formulasuser_google_emailrequiredinclude_hyperlinksinclude_smart_chips
modify_sheet_values
Modify Sheet Values
Modifies values in a specific range of a Google Sheet - can write, update, or clear values,
or insert Smart Chips (Drive files/folders or People).
Parameterschipsvalueschip_typerange_namerequiredclear_valuesspreadsheet_idrequireduser_google_emailrequiredvalue_input_option
format_sheet_range
Format Sheet Range
Applies formatting to a range: colors, number formats, text wrapping,
alignment, text styling, cell merging/unmerging, borders, and dropdown lists.
Colors accept hex strings (#RRGGBB). Number formats follow Sheets types
(e.g., NUMBER, CURRENCY, DATE, PERCENT). If no sheet name is provided,
the first sheet is used.
Parametersbolditalicbordersfont_sizemerge_typerange_namerequiredtext_colormerge_cellsborder_colorborder_stylewrap_strategyclear_dropdown+9 more
manage_conditional_formatting
Manage Conditional Formatting
Manages conditional formatting rules on a Google Sheet. Supports adding,
updating, and deleting conditional formatting rules via a single tool.
Parametersactionrequiredrange_namerule_indexsheet_nametext_colorcondition_typespreadsheet_idrequiredgradient_pointsbackground_colorcondition_valuesuser_google_emailrequired
create_spreadsheet
Create Spreadsheet
Creates a new Google Spreadsheet.
Parameterstitlerequiredfolder_idsheet_namesuser_google_emailrequired
Creates a new sheet or duplicates an existing sheet (user_google_email: str, spreadsheet_id: str, sheet_name: Optional[str] = None, source_sheet_name: Optional[str] = None, insert_sheet_index: Optional[int] = None).
Parameterssheet_namespreadsheet_idrequiredsource_sheet_nameuser_google_emailrequiredinsert_sheet_index
list_sheet_tables
List Sheet Tables
Lists all structured tables in a spreadsheet with their IDs, names, ranges,
and column details. Use this to find table IDs for append_table_rows.
Parametersspreadsheet_idrequireduser_google_emailrequired
append_table_rows
Append Table Rows
Appends rows to a structured table in a Google Sheet. The rows are added
to the end of the table body, automatically extending the table range.
Use list_sheet_tables first to find the table ID.
Parametersvaluesrequiredtable_idrequiredspreadsheet_idrequireduser_google_emailrequired
manage_sheet_tab
Manage Sheet Tab
Manages an existing sheet tab: rename, delete, hide, unhide, reorder, or
style (tab color and gridlines).
Use create_sheet to add a tab, and resize_sheet_dimensions for row and column
level changes. This tool operates on the tab itself.
Parametersactionrequirednew_namenew_indextab_colorsheet_namerequiredshow_gridlinesspreadsheet_idrequireduser_google_emailrequired
resize_sheet_dimensions
Resize Sheet Dimensions
Manages sheet-level dimension properties: resize columns/rows, auto-resize
to fit content, freeze rows/columns, hide/unhide rows/columns, and
insert/delete rows/columns.
Every row number and column letter refers to the sheet as it was before
the call, even when one call both inserts and deletes. Deletes are applied
before inserts, and an insert position inside a deleted span lands where
that span was.
Parametershide_rowsrow_sizessheet_namedelete_rowsinsert_rowsunhide_rowscolumn_sizeshide_columnsdelete_columnsinsert_columnsinsert_rows_atspreadsheet_idrequired+8 more
move_sheet_rows
Move Sheet Rows
Moves rows from one sheet to another within the same spreadsheet. The move
is performed in a single batchUpdate (copyPaste followed by
deleteDimension). Note: batchUpdate executes requests sequentially but does
not roll back on partial failure — if the copy succeeds but the delete
fails, rows may be duplicated. Formulas, data types, and formatting are
preserved (unlike a values.get/append round-trip).
Row numbers are 1-based (matching the spreadsheet UI).
Parametersend_rowrequiredstart_rowrequiredsource_sheetrequiredspreadsheet_idrequireddestination_sheetrequireduser_google_emailrequired
manage_named_range
Manage Named Range
Manages the lifecycle of named ranges in a Google Sheet: list, create, update, or delete.
Parametersnameactionrequirednew_namenew_rangerange_namenamed_range_idspreadsheet_idrequireduser_google_emailrequired
Lists Google Chat spaces (rooms and direct messages) accessible to the user.
Parameterspage_sizespace_typeuser_google_emailrequired
Retrieves messages from a Google Chat space.
Parametersorder_byspace_idrequiredpage_sizemessage_filteruser_google_emailrequired
Sends a message to a Google Chat space, or edits a message already sent there.
Parametersspace_idrequiredthread_keythread_namemessage_namemessage_textrequireduser_google_emailrequired
search_messages
Search Messages
Searches for messages in Google Chat spaces by text content and/or time range.
Parametersqueryspace_idpage_sizemax_spacestime_filteruser_google_emailrequired
create_reaction
Create Reaction
Adds an emoji reaction to a Google Chat message.
Parametersmessage_idrequiredemoji_unicoderequireduser_google_emailrequired
download_chat_attachment
Download Chat Attachment
Downloads an attachment from a Google Chat message and saves it to local disk.
In stdio mode, returns the local file path for direct access.
In HTTP mode, returns a temporary download URL (valid for 1 hour).
Parametersmessage_idrequiredattachment_indexuser_google_emailrequired
Create a new form using the title given in the provided form message in the request.
Parameterstitlerequireddescriptiondocument_titleuser_google_emailrequired
Get a form.
Parametersform_idrequireduser_google_emailrequired
set_publish_settings
Set Publish Settings
Updates the publish settings of a form.
Parametersform_idrequiredis_publisheduser_google_emailrequiredis_accepting_responses
get_form_response
Get Form Response
Get one response from the form.
Parametersform_idrequiredresponse_idrequireduser_google_emailrequired
list_form_responses
List Form Responses
List a form's responses.
Parametersform_idrequiredpage_sizepage_tokenuser_google_emailrequired
batch_update_form
Batch Update Form
Apply batch updates to a Google Form.
Supports adding, updating, and deleting form items, as well as updating
form metadata and settings. This is the primary method for modifying form
content after creation.
Parametersform_idrequiredrequestsrequireduser_google_emailrequired
create_presentation
Create Presentation
Create a new Google Slides presentation.
Parameterstitleuser_google_emailrequired
get_presentation
Get Presentation
Get details about a Google Slides presentation.
Parametersrawinclude_stylespresentation_idrequiredinclude_geometryuser_google_emailrequiredinclude_speaker_notes
batch_update_presentation
Batch Update Presentation
Apply batch updates to a Google Slides presentation.
Parametersrequestsrequiredpresentation_idrequireduser_google_emailrequired
Get details about a specific page (slide) in a presentation.
Parametersrawinclude_stylespage_object_idrequiredpresentation_idrequiredinclude_geometryuser_google_emailrequired
render_page_to_image
Render Page to Image
Render a slide (or any page, including notes pages) to an image and return it as image content, for looking at a slide's layout and visuals.
Parameterssizepage_object_idrequiredpresentation_idrequireduser_google_emailrequired
list_task_lists
List Task Lists
List all task lists for the user.
Parameterspage_tokenmax_resultsuser_google_emailrequired
get_task_list
Get Task List
Get details of a specific task list.
Parameterstask_list_idrequireduser_google_emailrequired
manage_task_list
Manage Task List
Manage task lists: create, update, delete, or clear completed tasks.
Parameterstitleactionrequiredtask_list_iduser_google_emailrequired
List all tasks in a specific task list.
Parametersdue_maxdue_minpage_tokenmax_resultsshow_hiddenupdated_minshow_deletedtask_list_idrequiredcompleted_maxcompleted_minshow_assignedshow_completed+1 more
Get details of a specific task.
Parameterstask_idrequiredtask_list_idrequireduser_google_emailrequired
Manage tasks: create, update, delete, or move tasks within task lists.
Parametersduenotestitleactionrequiredparentstatustask_idprevioustask_list_idrequireduser_google_emailrequireddestination_task_list
list_contacts
List Contacts
List contacts for the authenticated user, optionally as a full or incremental sync.
Parameterspage_sizepage_tokensort_ordersync_tokenuser_google_emailrequiredrequest_sync_token
Get detailed information about a specific contact.
Parameterscontact_idrequireduser_google_emailrequired
search_contacts
Search Contacts
Search contacts by name, email, phone number, or other fields.
Parametersqueryrequiredpage_sizeuser_google_emailrequired
manage_contact
Manage Contact
Create, update, or delete a contact. Consolidated tool replacing create_contact,
update_contact, and delete_contact.
Parametersurlsemailnotesphoneactionrequiredemailsphonesaddressbirthdayjob_titlenicknamesrelations+14 more
list_contact_groups
List Contact Groups
List contact groups (labels) for the user.
Parameterspage_sizepage_tokenuser_google_emailrequired
get_contact_group
Get Contact Group
Get details of a specific contact group including its members.
Parametersgroup_idrequiredmax_membersuser_google_emailrequired
manage_contacts_batch
Manage Contacts Batch
Batch create, update, or delete contacts. Consolidated tool replacing
batch_create_contacts, batch_update_contacts, and batch_delete_contacts.
Parametersfieldactionrequiredupdatescontactscontact_idsuser_google_emailrequired
manage_contact_group
Manage Contact Group
Create, update, delete a contact group, or modify its members. Consolidated tool
replacing create_contact_group, update_contact_group, delete_contact_group, and
modify_contact_group_members.
Parametersnameactionrequiredgroup_idadd_contact_idsdelete_contactsuser_google_emailrequiredremove_contact_ids
search_custom
Search Custom
Performs a search using Google Custom Search JSON API.
Parametersqrequirednumsafesitesstartcountrylanguagefile_typesearch_typesite_searchdate_restrictuser_google_emailrequired+1 more
get_search_engine_info
Get Search Engine Info
Retrieves metadata about a Programmable Search Engine.
Parametersuser_google_emailrequired
get_script_project
Get Script Project
Read Apps Script projects and their source files.
Parametersactionrequiredfile_namepage_sizescript_idpage_tokenuser_google_emailrequired
manage_script_content
Manage Script Content
Update the source files of an Apps Script project.
Parametersfilesmergeactionrequiredscript_idrequireduser_google_emailrequired
run_script_function
Run Script Function
Executes a function in a deployed script.
Parametersdev_modescript_idrequiredparametersdeployment_idfunction_namerequireduser_google_emailrequired
manage_deployment
Manage Deployment
Create, update, or delete Apps Script deployments.
Parametersactionrequiredscript_idrequireddescriptiondeployment_idversion_numberuser_google_emailrequiredversion_description
list_script_deployments
List Script Deployments
List deployments for an Apps Script project.
Parametersscript_idrequireduser_google_emailrequired
manage_script_project
Manage Script Project
Create or delete an Apps Script project.
Parameterstitleactionrequiredparent_idscript_iduser_google_emailrequired
manage_script_version
Manage Script Version
Create immutable version snapshots of a script project.
Versions capture a snapshot of the current script code; once created they
cannot be modified.
Parametersactionrequiredscript_idrequireddescriptionuser_google_emailrequired
get_script_version
Get Script Version
List or retrieve immutable version snapshots of a script project.
Parametersactionrequiredscript_idrequiredversion_numberuser_google_emailrequired
get_script_activity
Get Script Activity
Read execution activity for scripts: recent processes or aggregate metrics.
Parametersactionrequiredpage_sizescript_iduser_google_emailrequiredmetrics_granularity
generate_trigger_code
Generate Trigger Code
Generates Apps Script code for creating triggers.
The Apps Script API cannot create triggers directly - they must be created
from within Apps Script itself. This tool generates the code you need.
To list or remove existing triggers without opening the editor, use
`manage_script_trigger` (action="list" / action="delete") instead.
Parametersscheduletrigger_typerequiredfunction_namerequired
manage_script_trigger
Manage Script Trigger
List or delete the current user's installable triggers on a script project.
The Apps Script REST API has no triggers resource, so in dev_mode both actions
provision (or refresh) a small helper file and run it via the Execution
API - the only way to inspect or change trigger state without opening the
editor. Neither action is read-only: the helper file may be written into the
project on first use. To create a trigger, use `generate_trigger_code` to
produce the setup code, add it with `manage_script_content`, then run it with
`run_script_function`.
Parametersactionrequireddev_modescript_idrequiredtrigger_iddeployment_idhandler_functionuser_google_emailrequired