Google Workspace

com.foreverworks由 foreverworks.com 發布v0.2.0更新於 Nov 7, 2026

在多個 Google 帳戶中搜索並使用 Gmail、日曆、雲端硬碟、文件、表格和投影片。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Search and work in Gmail, Calendar, Drive, Docs, Sheets and Slides across several Google accounts.

概覽

Google Workspace 的本機 MCP 服務,由 foreverworks.com 發布;無需登入;STDIO;115 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

發布者
foreverworks.com

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Google Workspace,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Google Workspace icon] Google Workspace MCP server

Search, read and organise the mail, calendars, Drive files, Docs, Sheets, Slides, Google Tasks, contacts and Meet transcripts of several Google accounts at once, from your AI assistant. It writes drafts, labels, filters, events, tasks, files, documents, comments and sharing. Nothing is money, and nothing deletes mail or a file for good: Gmail and Drive keep the trash for 30 days.

Mail stays a draft until you say send. Sending, sharing a file and publishing a revision are write tools that tell your assistant to wait for your explicit go. The server does not ask you itself; your client can, before each call. MCP_MAX_ACCESS=read makes the server read-only.

You need one or more Google accounts, a browser, and about ten minutes for npx -y @foreverworks/mcp-google setup, which walks you through the rest: an OAuth client of your own in a free Google Cloud project, made with a few clicks Google lets no program make, and one approval per product and account (what it does). Nothing to set by hand. The Workspace directory, Meet transcripts and smart notes, and focus time and out of office events need a Google Workspace account.

What you can ask

  • "What's on my calendar this week across both accounts, and does anything clash?"
  • "Find 45 minutes with Ana Popescu next week, mornings first."
  • "Save every PDF that came to my work mailbox as an attachment in September."
  • "Draft a reply to Ana's last email saying Thursday at 10 works. I'll send it myself."
  • "Add these invoices to the Invoices sheet, and update any row whose invoice number is already there."
  • "What did we decide in yesterday's call with Client SRL? Read me the transcript."

Install

[Install in VS Code] [Install in Cursor] [Download for Claude Desktop]

With Claude Code:

bash
claude mcp add google -- npx -y @foreverworks/mcp-google

Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:

json
{  "mcpServers": {    "google": {      "command": "npx",      "args": ["-y", "@foreverworks/mcp-google"]    }  }}

Each runs the published package on Node 22.19 or newer. VS Code and the Claude Desktop bundle ask for each setting as they add the server; leave an optional one empty. Cursor reads each from your environment instead (${env:CALENDAR_TIME_ZONE} and so on), so set them before you start Cursor. Every setting is optional; Configuration says which ones you need for which tools.

From a clone

bash
git clone https://github.com/foreverworks/mcps.git && cd mcpsnpm ci && npm run buildclaude mcp add google -- node "$PWD/servers/google/dist/index.js"

In a JSON configuration, the command is node and its one argument the full path of servers/google/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.

Then run setup once, in a terminal, before your first question:

bash
npx -y @foreverworks/mcp-google setup

It asks which products and accounts to connect, opens each Google page you need, picks up the file you download, and has you approve each product in your browser. At the end it prints the command above, with GOOGLE_TOOLSETS added if you chose only some products. Run it again to add an account or a product; it keeps what is already done.

Over HTTP (MCP_HTTP_PORT), one process serves every session, with one token cache per grant.

Configuration

Nothing needs setting. setup saves the OAuth client and every grant in the server's state directory, ~/.local/state/mcps/google (on Windows %APPDATA%\mcps\google), and the server finds them there. Each grant records the address it was approved as, which is how the server knows which Google account each label stands for. A label is lowercase letters, digits and hyphens (personal, work, client-a), and stands for one Google identity in every product.

The variables below are for a deployment that keeps these files elsewhere, or lists its accounts itself. A variable that is set always wins over what setup saved, and health says where each value came from.

VariableRequiredMeaning
GOOGLE_OAUTH_CLIENT_FILEnoThe OAuth client JSON from the Google Cloud console (a Desktop app client), on which new grants are made. Default: the one setup saved, oauth-client.json in the state directory. Without either, a consent borrows the client of a credentials file the account already has.
GMAIL_ADDRESSESnolabel=address,...: the Google address each account label stands for, in every product. Default: the address each grant recorded. A consent approved as anyone else is refused, and health checks Gmail grants against it.
GMAIL_MODIFY_ACCOUNTSnolabel=path,...: where each mailbox's own gmail.modify grant is kept, which begin_consent writes. Default: every gmail/<label>/credentials.json in the state directory is a mailbox. Set, it lists the mailboxes on its own.
CALENDAR_TIME_ZONEnoThe IANA zone a time without an offset is read in, and working hours default to; default the process's zone (TZ).

Everything the server writes (token caches, grants, waiting consents, downloads) goes under GOOGLE_STATE_DIR: by default systemd's STATE_DIRECTORY, else $XDG_STATE_HOME/mcps/google, unless a variable below moves a product's part.

Every other variable (all optional)
VariableMeaning
GMAIL_ACCOUNTSlabel=path,...: a read-only (gmail.readonly) grant per mailbox, made elsewhere, for instance by a mail-sync program. A mailbox whose gmail.modify grant file does not exist runs on this one: it reads, and every write refuses.
GMAIL_DEFAULT_ACCOUNTThe mailbox a one-mailbox read uses when none is named; default the first listed.
GMAIL_STATE_DIRGmail's token caches, <dir>/<label>/; default <GOOGLE_STATE_DIR>/gmail/state.
GMAIL_ATTACHMENTS_DIRWhere attachments are saved, <dir>/<label>/; default attachments/ in each mailbox's state folder.
GMAIL_TIME_ZONEThe zone a reply's "On <date> ... wrote:" line and a forward's Date line are written in, as Gmail writes them in its reader's zone; default CALENDAR_TIME_ZONE, else the process's zone.
CALENDAR_ROOTCalendar grants, <root>/<label>/credentials.json (written by consent); default <GOOGLE_STATE_DIR>/calendar.
CALENDAR_DEFAULT_ACCOUNTThe account a one-account Calendar read uses; default the first by name.
DRIVE_CREDENTIALSDrive's one grant (written by consent); default <GOOGLE_STATE_DIR>/drive/credentials.json.
DRIVE_STATE_DIRDrive's token cache; default <GOOGLE_STATE_DIR>/drive/state.
DRIVE_DOWNLOADS_DIRWhere download_file and download_revision save; default <GOOGLE_STATE_DIR>/drive/downloads.
DRIVE_MIRROR_ROOTA local copy of My Drive the server may read: upload_file also takes files from it, and sends each to the folder it mirrors.
DRIVE_RCLONE_CONFAn rclone config whose remote's grant Drive borrows until it has its own. The remote must carry its own client_id and client_secret, since rclone's built-in client cannot be refreshed from here. Unset: no rclone.
DRIVE_RCLONE_REMOTEThat remote's name; default gdrive.
GOOGLE_EDITORS_ROOTDocs, Sheets and Slides grants, <root>/<label>/credentials.json; default <GOOGLE_STATE_DIR>/editors.
GOOGLE_EDITORS_STATE_DIRTheir token caches, <dir>/<label>/, for when the grants must stay read-only; default <root>/<label>/state.
GOOGLE_EDITORS_DRIVE_ACCOUNTThe label whose Docs, Sheets and Slides run on Drive's grant. Unset: none does.
GOOGLE_EDITORS_DEFAULT_ACCOUNTThe account a Docs, Sheets or Slides read uses when none is named; default the one on Drive's grant, else the first.
TASKS_ROOTGoogle Tasks grants, <root>/<label>/credentials.json; default <GOOGLE_STATE_DIR>/tasks.
CONTACTS_ROOTThe same for contacts and the directory; default <GOOGLE_STATE_DIR>/contacts.
MEET_ROOTThe same for Meet's records; default <GOOGLE_STATE_DIR>/meet.
GOOGLE_CONSENT_REDIRECT_URIThe loopback address a consent redirects to; default http://localhost:8123/.
GOOGLE_STATE_DIRThe root of all of the above.
GOOGLE_TOOLSETSThe products whose tools the server loads, separated by commas; default every one (Toolsets).

The variables every server shares (MCP_HTTP_PORT, MCP_MAX_ACCESS, MCP_FILE_ROOTS, MCP_FILE_SCRIPT and the rest) are in docs/configuration.md.

Toolsets

Every tool definition the server hands your client travels with each request the client makes, so a client that only needs mail and calendars pays for Drive, Docs, Sheets and the rest all the same. GOOGLE_TOOLSETS names the products to load, separated by commas, the way GitHub's MCP server takes GITHUB_TOOLSETS. The tools of a product not loaded are not there at all: not in the tool list, not in the server's instructions, not in list_accounts or health. Unset, empty or all, every product is loaded, as before.

ToolsetWhat it loads
gmailMail: search, read, drafts, sending, labels, filters and attachments.
calendarEvents, free/busy, finding a time, and answering invitations.
driveDrive's files and folders: paths, changes, upload and download.
docsGoogle Docs, simple edits and the full API, with editors_api_reference.
sheetsGoogle Sheets, rows and ranges and the full API, with editors_api_reference.
slidesGoogle Slides, decks from an outline and the full API, with editors_api_reference.
collaborationComments, sharing and revisions on any Drive file.
tasksGoogle Tasks.
contactsfind_people: contacts, saved addresses and a Workspace directory.
meetMeet's meetings, transcripts and smart notes.

list_accounts, health, begin_consent and complete_consent are always loaded: every other tool takes a label list_accounts names, every remedy points to health, and consent is how any grant is made, including one a loaded product leans on (Meet reads a calendar event through the Calendar grant). A name that is not a toolset stops the server at start, with a message listing the ones there are. Measured with scripts/measure-tokens.ts on 2026-10-23 (GPT-4 tokenizer), the tool list is 115 tools and about 84,800 tokens with every toolset (39,200 without the product icons, which a client may not show the model), 43 tools and 35,600 (16,100) with gmail,calendar, and 46 tools and 32,400 (15,200) with drive,docs,sheets.

To load mail and calendars only, with Claude Code:

bash
claude mcp add google -e GOOGLE_TOOLSETS=gmail,calendar -e GOOGLE_OAUTH_CLIENT_FILE="<path to OAuth client file>" -e GMAIL_ADDRESSES="<Accounts and their addresses>" -e GMAIL_MODIFY_ACCOUNTS="<Where Gmail grants are kept>" -- npx -y @foreverworks/mcp-google

Or in Claude Desktop's configuration:

json
{  "mcpServers": {    "google": {      "command": "npx",      "args": ["-y", "@foreverworks/mcp-google"],      "env": {        "GOOGLE_TOOLSETS": "gmail,calendar",        "GOOGLE_OAUTH_CLIENT_FILE": "/path/to/oauth-client.json",        "GMAIL_ADDRESSES": "[email protected],[email protected]",        "GMAIL_MODIFY_ACCOUNTS": "personal=/path/to/grants/gmail-personal.json,work=/path/to/grants/gmail-work.json"      }    }  }}

A toolset removes tools; MCP_MAX_ACCESS=read keeps every tool listed and refuses the writes. The shell's --health checks every product whatever GOOGLE_TOOLSETS says; name a product to narrow it.

Getting the OAuth client

The server reaches Google through an OAuth client that belongs to you, in a Google Cloud project of your own. Google's terms do not let a client ship inside an open-source program, so each person makes one. It costs nothing, and your grants then depend on no one else's project.

npx -y @foreverworks/mcp-google setup makes it with you. Run it in a terminal on the computer whose browser you use:

  1. Products and accounts. It asks which products to connect (the toolsets) and a label for each Google account, such as personal and work.
  2. A project and its APIs. With gcloud installed and signed in, it offers to create the project and enable the APIs itself. Otherwise it opens the console to create a project, then one link that enables every API your products need.
  3. Google Auth Platform. Four pages that no program may fill in. Setup opens each one in turn and says what to choose:
    • Branding. On a new project, click Get started, then give an app name only you will see and your address. For an External app, Google also wants an App domain before it lets you publish: setup gives you this server's home page and its privacy policy to paste, with github.com as the authorized domain.
    • Audience. Choose Internal if every account belongs to the Google Workspace organisation that owns the project. Otherwise choose External, then Publish app: Google expires the grants of an app left in Testing after seven days. Only someone holding your client file can ask for an approval, and your own accounts need no verification.
    • Data Access. Setup prints the exact scopes your products ask for, to paste under Manually add scopes.
    • Clients. Create client of type Desktop app, then click Download JSON in the dialog that follows. Google shows the client's secret only there.
  4. The client file. Setup watches your Downloads folder for the client_secret_....json you downloaded (or takes a path you type), checks that it is a Desktop app client, and moves it into the state directory, readable only by you.
  5. Approvals. For each product and account, setup opens Google's consent page. Choose the account it names. For an External app, Google first warns that it "hasn't verified this app": the app is yours, so click Advanced, then Go to followed by your app's name. Click Continue, tick Select all, and continue again. Google then sends your browser back to setup on 127.0.0.1, which checks the grant and saves it. An account's first approval records its address, and every later one must be approved as that address. If your browser runs on another computer (setup over SSH), the page it lands on fails to load: paste that page's address into setup instead.
Doing it by hand instead

One OAuth client of your own serves every account and product.

  1. In the Google Cloud console, create a project for this server.

  2. Under APIs & Services, Library, enable the APIs of the products you will use: Gmail API, Google Calendar API, Google Drive API, Google Docs API, Google Sheets API, Google Slides API, Google Tasks API, People API (contacts and the directory) and Google Meet REST API.

  3. Open Google Auth Platform. Under Branding, name the app and give your e-mail; for an External app, also fill in App domain (a home page and a privacy policy link on an authorized domain), which Google requires before publishing. Under Audience, pick who may use it, then add every account as a test user or Publish app: Google expires the refresh tokens of an app left in Testing after seven days. A published app can stay unverified for your own accounts; at consent, continue past Google's warning screen.

  4. Under Data Access, add the scopes of the products you will use (each is https://www.googleapis.com/auth/ followed by the name below):

    ProductScopes
    gmailgmail.modify, and gmail.settings.basic for filters
    calendarcalendar.events, calendar.calendarlist.readonly, calendar.events.freebusy
    drivedrive
    editors (Docs, Sheets, Slides)documents, spreadsheets, presentations, drive.file
    taskstasks
    contactscontacts.readonly, contacts.other.readonly, and directory.readonly (optional: only a Workspace account has a directory)
    meetmeetings.space.readonly

    Every consent also asks for userinfo.email, so the server can check who approved it.

  5. Under Clients, Create client of application type Desktop app, and download its JSON (its installed block holds the client_id and client_secret). Keep the file private: save it as oauth-client.json in the state directory, or point GOOGLE_OAUTH_CLIENT_FILE at it.

  6. Name your accounts, since the server checks each consent against the address of its label, then make each grant from your assistant (First run):

First run

  1. Restart your client after adding the server, and ask your assistant for health. Every grant should refresh as the address you meant, with the scopes you ticked, and every API it checks should answer. Under config it says where each setting came from: a variable, or what setup saved.
  2. To add a product or an account later, run setup again. Your assistant can also make a grant for an account the server already knows: ask it to "run begin_consent for calendar, account work" (the product is gmail, calendar, drive, editors, tasks, contacts or meet), open the URL it returns, and approve as the address it names. The browser then fails to load http://localhost:8123/?state=...&code=..., as expected: nothing listens there. Within 15 minutes, copy the whole address from the address bar and give it to your assistant for complete_consent. The product uses the grant from its next call, with no restart.

Drive holds one grant: setup asks which account's Drive the Drive tools should reach, and consents drive for that one. That account's Docs, Sheets and Slides can share it (GOOGLE_EDITORS_DRIVE_ACCOUNT=personal); every other account consents editors for its own.

From a shell, npx -y @foreverworks/mcp-google --health [gmail|calendar|drive|editors|tasks|contacts|meet] prints one line per account and grant and exits with the worst line's code, for a timer. With no product named, it starts with CONFIG: lines saying where each setting came from.

Tools

read changes nothing in your accounts (the download tools save a local copy); write changes something in one of them. With GOOGLE_TOOLSETS set, only the tables of the toolsets loaded apply; the accounts and consent tools are always there.

Every tool takes account, a label from list_accounts, except Drive's (Drive holds one grant), list_accounts, complete_consent and editors_api_reference. The reads that make sense across accounts (search_threads, agenda, free_busy, find_time, list_calendars, list_tasks, list_task_lists, find_people and health) read every account when none is named; any other read uses the product's default account. A write has no default, because mail or an event made as the wrong identity goes out under that identity.

Accounts and consent

ToolAccessWhat it does
list_accountsreadThe accounts each product reaches, the default, and which grant each runs on. Start here.
healthreadPer product and account: whether the grant refreshes, which address it resolves to, the scopes Google granted, and, for Docs, Sheets, Slides, Tasks, contacts and Meet, whether the API is enabled.
begin_consentwriteThe URL that grants one product access to one account; open it in a browser and approve as the address named.
complete_consentwriteFinishes a consent from the URL the approval redirected to; the grant is checked and saved where the product reads it.

Gmail

ToolAccessWhat it does
search_threadsreadGmail query syntax across every mailbox at once, each result tagged with its account.
get_thread / get_messagereadA thread or message with its bodies and attachment list (detail: metadata, text, raw_html).
get_messagesreadUp to 25 messages of one mailbox in one call, in the order given; one that cannot be read comes back in its place, marked partial, and the rest still arrive.
get_attachmentreadOne attachment saved to the attachments folder, with its size and sha256.
harvest_attachmentsreadEvery attachment a search matches, saved in one call, with counts to reconcile.
list_historyreadMessages added since a historyId: incremental sync instead of searching again.
list_labelsreadSystem and user labels.
sender_breakdownreadWho the threads a search matches come from, per domain, busiest first.
list_filtersreadFilters, with the search each one's criteria amount to.
get_draft / list_draftsreadDrafts, each with its Gmail web link.
create_draft / update_draft / delete_draftwriteDrafts: the default for anything addressed to someone.
reply / forwardwriteThreaded for every party; a draft unless send is true.
send_draft / send_messagewriteSend. Only on the user's explicit go for that message.
modify_labels / modify_labels_matchingwriteArchive, mark read, star, file: labels on given threads, or on every thread a search matches (a dry run by default).
create_label / update_label / delete_labelwriteUser labels; system labels are refused.
create_filter / delete_filterwriteFilters that set labels (no forwarding); one that sends mail to TRASH or SPAM needs discard.
trash / untrash / mark_spam / unmark_spamwriteThreads or messages; there is no permanent delete.

Calendar

ToolAccessWhat it does
agendareadEvents across every account in time order, with the conflicts between them and the invitations not yet answered; with include_tasks, the tasks due on those days too.
list_calendarsreadEvery calendar each account sees, and whether agenda reads it.
get_eventreadOne event in full: description, guests and their answers, reminders, meeting link.
free_busyreadBusy blocks across every account, merged, plus other people's (attendees); what could not be read is listed.
find_timereadFree slots of a given length inside working hours (Monday to Friday, 09:00 to 18:00 by default), after notice, with buffers.
create_event / update_event / delete_eventwriteEvents, with a new Meet link on request, and focus time or out of office blocks; nobody is emailed unless send_updates says so, and a whole series is touched only with scope: "series".
respond_to_invitewriteAccept, decline or answer tentative; changes only your own answer.

Drive

ToolAccessWhat it does
resolve_path / path_ofreadA path to the id it names (or the ids, when two share it), and back.
list_folder / find_files / describe_filereadA folder's children, a search of the whole Drive, one file's metadata.
read_docreadA Doc, Sheet or deck exported as text, markdown or HTML.
start_drive_cursor / drive_changesreadWhat changed since a cursor, in one call that returns only the delta.
download_filereadA file saved to the downloads folder, checked against Drive's checksum first (a Google file is exported).
upload_filewriteA file onto Drive byte for byte, checked against what Drive stored; a damaged upload is taken back. With convert, a .docx, .xlsx or .pptx (their older forms, or a .csv) becomes a Google Doc, Sheet or deck.
copy_file / move_file / rename_filewriteCopy, move (with a dry run that names every collision) and rename, Docs included.
create_folderwriteA folder and every missing folder above it.
trash_file / untrash_filewriteDrive's trash, recoverable for 30 days; there is no permanent delete.

Comments, sharing and revisions

On any Drive file (a Doc, a Sheet, a deck, a PDF), acting as a Docs, Sheets and Slides account.

ToolAccessWhat it does
list_commentsreadComment threads with their replies, quoted text and resolved state; open and resolved counted.
add_comment / reply_to_commentwriteA new thread, or a reply that may resolve or reopen one.
edit_comment / delete_commentwriteA comment's or a reply's text changed, or removed.
list_permissionsreadWho has access and how, and the link sharing in a line.
share_file / update_permission / remove_permissionwriteAccess given to a person, group, domain or anyone with the link, changed or taken away; Drive's email only when asked. Only on the user's explicit go.
list_revisionsreadA file's revisions: who, when, and the formats an old one can be saved as.
download_revisionreadOne revision into the downloads folder, checked against its MD5, or exported for a Google file.
update_revisionwriteKeep a revision forever, or publish a Google file's revision to the web (only on the user's explicit go).

Docs, Sheets and Slides: the API reference

ToolAccessWhat it does
editors_api_referencereadWhat any Docs, Sheets or Slides request kind or type takes, from the API's own schema; with no name, every request kind.

Docs

ToolAccessWhat it does
read_documentreadA Doc (any tab) as markdown, with an index of its sections and its revisionId.
edit_document_sectionwriteReplaces everything under one heading with markdown, in any tab, pinned to the revision read.
append_to_documentwriteMarkdown after the last paragraph of any tab.
create_documentwriteA new Doc from markdown, in a folder.
get_documentreadThe structure with every index: tabs, paragraphs with styles and runs, tables cell by cell, objects; headers, footers, footnotes, lists, named ranges and styles on request; or the raw JSON through a field mask.
find_in_documentreadEvery place a text or a regular expression appears, as ranges a request can use, with the revision they are right for.
batch_update_documentwriteAny Docs API requests in one atomic batch, checked against the schema first and pinned to a revision whenever one names an index; local images through images.

Sheets

ToolAccessWhat it does
list_sheetsreadTitle, locale, time zone, and each sheet's id, size and frozen rows.
read_rowsreadRows as objects keyed by the header, typed: numbers, ISO dates, currency with its exact decimal.
read_sheet_cellsreadSparse cells with formulas, links, chips and notes, for a sheet with no header.
append_rows / upsert_rowswriteRows after the last, or matched by a key column and updated, in one atomic batch.
write_rangewriteValues or formulas into a named sheet's A1 range; returns what the cells held before.
format_rangewriteNumber format, text style, colours, borders, frozen rows and columns.
link_sheet_cellswriteHyperlinks on existing text cells, checked against their expected text first.
add_chartwriteA chart over a data range.
create_spreadsheetwriteA new Sheet with named sheets and bold, frozen header rows, in a folder.
get_spreadsheetreadThe structure with every id: sheets, merges, conditional formats, filters, protected and banded ranges, charts, slicers, tables, groups, named ranges, as A1; or the raw JSON with grid data through ranges and a field mask.
get_valuesreadSeveral ranges' values (or the cells data filters choose), formatted, unformatted or as formulas.
update_values / clear_valueswriteValues into several ranges or data filters in one call (raw or as typed), or emptied keeping their formats.
append_valueswriteRows after the table Sheets finds at a range.
batch_update_spreadsheetwriteAny Sheets API requests in one atomic batch, checked against the schema first, with A1 accepted wherever a GridRange, GridCoordinate or DimensionRange goes.
copy_sheet_towriteOne sheet copied into another spreadsheet, or the same one.
search_developer_metadatareadDeveloper metadata by id or by data filters, with where each tag is attached as A1.

Slides

ToolAccessWhat it does
list_layoutsreadA deck's layouts and each one's placeholders.
read_deckreadPer slide: layout, title, other text and speaker notes.
get_thumbnailsreadA PNG URL per slide (they expire in about half an hour).
create_deck_from_outlinewriteA template copied into a new deck, one slide per outline entry, checked against the template first.
fill_placeholderswriteReplaces {{tag}}s across the deck, with a count of each.
get_presentationreadThe structure with every object id: per slide its elements with size, transform and exact text, and the notes' shape; or the raw JSON through a field mask.
batch_update_presentationwriteAny Slides API requests in one atomic batch, checked against the schema first, optionally pinned to a revision; local images through images.
create_presentationwriteA blank deck in a folder, to build with batch_update_presentation.

Tasks

ToolAccessWhat it does
list_task_listsreadEvery Google Tasks list of each account, the default one marked.
list_tasksreadTasks across every account and list, open ones unless asked, optionally due between two dates.
create_task / create_task_listwriteA task (title, notes, due date, as a subtask or after a sibling), or a new list.
update_task / complete_taskwriteA task's title, notes or due date; done, or open again. Only what differs is sent, so a repeat changes nothing.
move_taskwriteUnder another task, after a sibling, or into another list of the same account.

Contacts

ToolAccessWhat it does
find_peoplereadA person's address by name across every account: its contacts, the addresses Gmail saved, and a Workspace directory, merged into one entry per person.

Meet

ToolAccessWhat it does
list_meetingsreadThe meetings of a calendar event, a Meet link or the last days, each with its transcripts, smart notes and recordings.
get_transcriptreadA transcript as lines of who said what, and when in the meeting.

Troubleshooting

A failure comes back as {"error": {"kind", "message", "remedy"}}, and the remedy names the next step.

config: "credentials at ... are missing or unparseable", "Drive has no grant", "no mailbox is set up" or "no calendar grant for "work"" (the same for other products). Run setup again and choose that product and account, or make the grant from your assistant (First run); the message lists the accounts that have one.

config: "no address is known for "work"". Nothing has recorded which Google account work stands for yet. Run setup with that label: its first approval records the address. Or add work=<address> to GMAIL_ADDRESSES. ""work" is not a mailbox here" means GMAIL_MODIFY_ACCOUNTS is set and does not list it: add work=<path>. "no OAuth client is known" means setup has not saved one and GOOGLE_OAUTH_CLIENT_FILE is not set.

setup: "it is a Web application client". The client was created with the wrong type. In Clients, create another of type Desktop app, download its JSON, and give setup that file.

setup: Publish app is greyed out. Google wants the App domain on the Branding page first: a home page, a privacy policy link and the domain they are on, saved. Setup prints values you can use.

setup waits for the client file and nothing happens. Your browser saved it somewhere other than your Downloads folder, or you closed Google's dialog before downloading it. Type the file's path; if you have none, create another Desktop app client, since Google shows a secret only once.

input: "no consent is waiting for that state". The consent expired after 15 minutes, was already completed, or was begun by a copy of the server with another state directory. Begin again; each consent URL works once.

auth with code wrong_account or insufficient_scope at consent. You approved as another address or left a box unticked; nothing was saved. Begin again as the address named, and tick every box. On a later call, insufficient_scope means the grant lacks what that call needs (filters need gmail.settings.basic): consent the product again.

auth with code readonly_grant. The mailbox runs on a read-only grant from GMAIL_ACCOUNTS, so writes refuse before any request. Consent gmail for it.

auth with code invalid_grant. The refresh token expired or was revoked. Consent the product again; if the app is in Testing, publish it to stop the weekly expiry. A read-only grant from GMAIL_ACCOUNTS is renewed by whatever made it. deleted_client means the OAuth client itself is gone from the Cloud console.

api with reason SERVICE_DISABLED or accessNotConfigured. Enable the API the remedy names in the Cloud project of the grant's OAuth client.

api with status 403 on a file. The account cannot open or change it: check it is shared with that account. On the editors scopes alone, Drive lets the client copy only files it created or opened, so create_deck_from_outline cannot copy a template made by hand; run that account on Drive's grant (GOOGLE_EDITORS_DRIVE_ACCOUNT).

api with reason outcome_unknown. A write failed after it may have reached Google (a dropped connection, a 5xx), so it was not retried. Look first (Sent or Drafts, agenda, list_tasks, read_document, read_rows, read_deck), and repeat it only if it is not there.

api with reason stale_revision. The document changed since it was read: read it again and redo the edit.

api with status 404 from list_history. Gmail expired that historyId: search again with search_threads, and take a new anchor from health.

quota. Google's per-minute quota held through every retry. Wait a minute.

ambiguous, with candidates. Two Drive objects answer to that path. Call again with file_id, one of the ids listed.

How it works

Accounts and grants

  • One grant per product and account, with its own token cache and only that product's scopes: a Tasks grant cannot read mail, and a Calendar token never reaches Gmail.
  • Grants are found, not listed: Calendar, Docs, Sheets and Slides, Tasks, contacts and Meet look for <root>/<label>/credentials.json on every call, and so does Gmail when GMAIL_MODIFY_ACCOUNTS is unset, so a new consent needs no restart.
  • Credentials are google.oauth2 JSON (refresh_token, client_id, client_secret, token_uri, scopes, account). A stored access token is ignored: the server refreshes under a lock, so copies sharing a state directory refresh once.
  • A file declares scopes; Google grants them. health reads each grant's real scopes, client and address from Google's tokeninfo, and fails a read-only Gmail grant that has grown a write scope.
  • Consent uses PKCE (S256) and prompt=consent (a refresh token every time), with login_hint set to the account's address. A grant approved as another address, missing a required scope, or without a refresh token is refused with nothing written; an optional scope may be left out. Only setup may consent an account no address is known for yet, because it shows the person who approved; that address is then the account's. Waiting consents and grants are written with mode 0600, a replaced grant is kept as .bak, and no token appears in a result.

Gmail

  • A send is never retried blind: only answers that prove Gmail did not act (429, a rate-limit 403, a 401 before the refresh) are retried. Everything a send depends on is read before it, so a sent mail is never reported as failed.
  • Replies look like Gmail's own: the original's markup, an attribution in Gmail's words and the inline images, so Gmail still folds the quote behind "•••". A forward carries the images too.
  • Attachments in are byte-exact or refused: a path inside the server's file roots (MCP_FILE_ROOTS), or content_base64 with the source's sha256 from a script, never typed by a model. Capping them at 30 MiB together lets a message slightly over Gmail's 25 MB get Gmail's own refusal, and uploads nothing far beyond it.
  • Attachments out are whole or absent. Each part's length is checked against the size Gmail states, and a file never replaces a different one (a second invoice.pdf becomes invoice (2).pdf). Gmail's "download all attachments" zip silently leaves out parts keyed by message id, so harvest_attachments walks each message's MIME tree instead.
  • Reads. Bodies are cut at 40,000 characters, and an HTML-only body is converted to text, saying so (bodySource). Gmail links use ?authuser=<address>, because /u/0/ depends on sign-in order.
  • Speed. search_threads fetches thread metadata 16 at a time, only the headers a summary reads: Gmail's batch endpoint runs its sub-requests one after another, and measured slower.

Calendar

Busy time comes from events, not from freebusy.query, which does not accept the calendar.events scope and cannot tell a tentative block or an all-day event's day. One rule (calendar/domain/events.ts) serves the agenda's conflicts, free_busy and find_time:

EventCounts as
confirmed, or an invitation not answered yetbusy
marked tentative, or answered "maybe"busy, flagged tentative; find_time books over it only with tentative_is_free
declined, "show as available", cancelled, or a working-location entryfree
all-day and left as busybusy from midnight to midnight in its calendar's zone
busy but without a usable start or endlisted under unknown, never dropped
  • One timeline. Overlapping and touching blocks are joined, so a meeting in two accounts counts once. Other people's time (attendees) comes from freebusy.query, asked through every account; someone nobody can see is unknown, never free.
  • Time. 2026-09-29 is a whole day, and find_time works one local day at a time, so 09:00 stays 09:00 across a DST change.
  • Writes. A series id looks like an occurrence's, so a whole series takes scope: "series". meet: true sends a request id made for that write, so a retry makes one Meet call. Focus time and out of office are checked against Google's rules (primary calendar, not all day, no guests, always busy), and decline nothing unless auto_decline says so: every decline is mail to an organiser.

Drive

  • A path is a query, not an address. A folder can hold two objects of one name: resolve_path reports both ids, and move_file refuses to create such a pair. A name may contain / (Meet writes folders like Weekly sync - 2030/01/15) and is then reachable only by id. Names created on macOS are often stored in NFD, so every lookup asks for both spellings.
  • A move is one metadata call. In a synced local copy a Doc is a placeholder file, and moving it there makes the sync replace the Doc with the placeholder.
  • Bytes are checked both ways. upload_file compares Drive's own checksum (or the bytes read back) with the source and takes back a difference (a replacement's new revision deleted, a new file trashed); download_file checks before writing anything. A converted upload has no bytes to compare, so the check is that Drive made the Google type asked for.
  • Rate limits. Drive reports one as a 403 with a reason, read here as a rate limit, not a permission failure. Its quota is per minute, so a refusal waits at least 22 seconds (in Docs, Sheets and Slides too).

Docs, Sheets and Slides

The operations (markdown sections, rows keyed by a header, decks from an outline) do the arithmetic that goes wrong (Docs' UTF-16 indices, Sheets' grid coordinates, Slides' object ids) in tested pure functions. The full APIs (get_*, find_in_document, batch_update_*) reach the rest.

  • Every write is one request: a Docs or Slides batchUpdate pinned to the revision it was computed from, or a Sheets batchUpdate that applies whole or not at all, never retried once it may have reached Google. A file can be given by its id or its URL.
  • Every batch is checked before it is sent against the API's Discovery document, vendored in src/<product>/domain/discovery.json (refresh it with npx tsx scripts/refresh-discovery.ts): kinds, fields, types, enum values, read-only fields and field masks, with the nearest right name for a typo. Every problem comes back in one refusal, and nothing is sent. editors_api_reference reads the same document, so it describes exactly what the check accepts, where a JSON Schema of Sheets' requests alone would load hundreds of kilobytes into every session.
  • Docs. get_document shows each element's [startIndex, endIndex), with one U+FFFC per index a non-text element takes. A batch that names an index needs expected_revision (refused if the document moved on) or target_revision (Docs carries the positions over later edits). edit_document_section refuses a section holding what markdown cannot carry (an image, a footnote: read_document counts them as notShown) unless drop_hidden is true. A regex in find_in_document runs in a fresh JavaScript context under a 1.5 second limit, so a backtracking pattern cannot stall the process.
  • Sheets. read_rows reads dates in the sheet's time, and a currency cell as {value, amount, formatted}, amount its exact decimal string. Writes take "=..." as a formula, "YYYY-MM-DD" as a date and {"amount": "12.50"} as a number, refused when a double cannot hold it exactly.
  • Local images. Docs and Slides insert an image only from a URL they fetch, so each PNG, JPEG or GIF in images (name to file path) goes to the account's Drive, shared by link for the batch, then unshared and trashed whatever the outcome; the result says what became of each copy.
  • Developer Preview requests (comments, accepting suggestions) pass the check; Google refuses them unless the Cloud project is in its preview program.

Tasks, contacts and Meet

  • Tasks. A due date is a date: Google Tasks keeps midnight UTC and drops any time. include_completed also shows tasks completed in Google's own apps, which the API otherwise hides.
  • Contacts. Results merge by address: contacts first, then the directory, then the addresses Gmail saved. A source an account cannot read is listed under unavailable, never read as nobody.
  • Meet. list_meetings finds a calendar event's meeting by its Meet code (read with the account's Calendar grant) and, for one occurrence, the sitting that started within an hour of it. Transcripts and notes are Google Docs, so read_document opens them; get_transcript reads one as [0:12:05] Ana Popescu: ..., naming each speaker from the participants.

The smoke scripts in scripts/ drive the built server (or a running one, with MCP_URL) against real accounts; those that write take SMOKE_ACCOUNT and clean up after themselves.

Limitations

  • No permanent delete of mail or files, only Gmail's and Drive's trash. A draft, label or filter deleted here is gone, though.
  • Filters only set labels (no forwarding), and Gmail has no filter update: create the new one, delete the old.
  • Drive holds one grant, so the Drive tools reach one account's Drive; other accounts reach their files through the Docs, Sheets, Slides, comment and sharing tools.
  • Consent needs a browser. Setup receives Google's redirect on 127.0.0.1 itself; a consent begun from your assistant (begin_consent) has the redirect address copied back by hand, since a server shared over HTTP cannot listen on your computer's loopback.
  • read_doc reads a Sheet as CSV of its first tab (Drive's export has no tab selector); read_rows reads any tab.
  • Docs' markdown tools: a bullet under a number comes out as a sub-number (one preset per list), a horizontal rule is dropped, and an image becomes a link.
  • What the APIs cannot do at all: insert a horizontal rule or set one list level's glyph in Docs, create a suggestion, anchor an API comment to text in a Doc, add animations in Slides. Apps Script reaches some of these, with its own project and grant.
  • Images reach Docs and Slides through a URL Google fetches, so a local file is shared by link on Drive for the seconds a batch takes. Sheets' API inserts no images (an =IMAGE() formula needs a link that stays public).
  • Sheets has no conditional write: rows someone inserts between a plan's read and its write shift under it, and the API has no revision pin.
  • The schema check knows the API revision this server was built with: a field Google added later is refused, naming that revision, until the Discovery documents are refreshed.
  • Tasks have no delete here, a repeating task cannot change lists (Google refuses it), and a due date has no time of day.
  • The directory answers only for a Workspace account; a personal account reports it under unavailable.
  • Meet keeps records for 30 days, shows only meetings the account took part in or organised, and has transcripts or smart notes only where the meeting turned them on (a Workspace feature).
  • Sizes: a message's attachments up to 30 MiB together, a Drive upload or download up to 100 MiB, free_busy and find_time over at most 62 days.

Other servers for Google Workspace

Searched 2026-10-15. Google runs its own servers, and two community servers are maintained and broad:

  • Google's remote MCP servers for Gmail, Drive, Docs, Sheets, Slides, Calendar, Chat, People and Classroom: a developer preview a Google Cloud project must enroll in, over Streamable HTTP, with one OAuth connection per account. They do less: the Gmail server cannot send, download an attachment or sync incrementally; the Drive server cannot move, rename or trash a file; Docs, Sheets and Slides take a raw, unchecked batchUpdate. docs/google-gaps.md compares them tool by tool.
  • googleworkspace/cli, Google's command line, has dropped its MCP mode; its Gemini CLI extension gemini-cli-extensions/workspace is a stdio server for one signed-in account.
  • workspace-mcp on PyPI: stdio, or Streamable HTTP with OAuth 2.1 for many users; more than 120 tools over twelve products, including Forms, Tasks, Chat, Contacts and Apps Script; each call acts for one account.
  • @aaronsb/google-workspace-mcp on npm: stdio, an OAuth token per account on local disk, so several accounts sit side by side; Gmail, Calendar, Drive, Docs, Sheets, Tasks, Meet and Contacts, not Slides.

The community servers reach more products. This one exists for what none of them offers: a mail search, the agenda (with conflicts between accounts) and free/busy read every account in one call, and a write has no default account; Gmail syncs from a historyId; Drive has a change cursor and revisions; and Docs, Sheets and Slides come both as operations and as each API's full batchUpdate, checked against the API's schema before sending, a Docs edit pinned to the revision it was computed from.

來源:servers/google/README.md,提交 7b93f2f

工具

115

add_chart

Add a chart

A chart over a data range: the first column is the domain (x axis, pie labels), the other columns (or series_columns) the series.

輸入參數type必填titleaccount必填headersdata_range必填anchor_cell必填series_columnsspreadsheet_id必填

add_comment

Comment on a file

A new comment thread on a Drive file, as the account. `quoted` shows the text it is about beside it. Google Docs shows a comment made through the API on the file, not anchored to text (Google's limit); `anchor` is for file types whose viewer reads one. Everyone with access to the file sees it.

輸入參數anchorquotedaccount必填content必填file_id必填

agenda

Agenda

Events across EVERY account at once, in time order, for a window: today and the next days by default. Also returns `conflicts` (busy events that overlap, including across accounts, e.g. a work meeting over a dentist appointment), `probableDuplicates` (one appointment booked into both accounts as two events) and `pendingInvites` (invitations not yet answered). Recurring events are expanded into their instances; an event seen through both accounts is listed once, with `alsoOn`. Declined events are left out unless asked for. Each event carries the account, calendarId and eventId that get_event, update_event, delete_event and respond_to_invite need. include_tasks adds `tasksDue`: the Google Tasks not yet done that fall due on the window's days (a task has a due date, never a time).

輸入參數todaysfromlimitqueryaccountcalendarsinclude_tasksinclude_declined

append_rows

Append rows

Rows after the last one holding data, keyed by the header, formatted like the row above. One atomic batch.

輸入參數rows必填sheetaccount必填header_rowspreadsheet_id必填

append_to_document

Append to a Google Doc

Markdown added after the document's last paragraph, in one batch.

輸入參數tabaccount必填markdown必填document_id必填expected_revision

append_values

Append rows after a table

Rows after the table Sheets finds at an A1 range (values.append), as new rows (INSERT_ROWS) or over empty ones (OVERWRITE). Returns where they went. Not retried after a lost answer, since a retry would add them twice. append_rows is the variant keyed by a header row.

輸入參數range必填values必填account必填insert_datavalue_inputinclude_valuesspreadsheet_id必填major_dimension

batch_update_document

Apply Docs API requests

Any Google Docs API batchUpdate: text, styles, bullets, tables (insert, merge, row and column, cell style), images by URL, headers, footers, footnotes, page and section setup, named ranges, tabs, replace all text, and the rest; local images through `images`. One atomic batch, checked against the API's schema before anything is sent (a wrong field is refused with the nearest right name). Requests apply in order, each to the document as the ones before left it: work from the end of the document backwards so earlier indices stay valid. A batch that names an index needs expected_revision (refused if the document changed) or target_revision (Docs carries the positions over later edits), from get_document or find_in_document. In a tab other than the first, put tabId in each location and range. Returns the new revisionId and the replies that carry ids or counts, by request position.

輸入參數imagesaccount必填requests必填document_id必填target_revisionexpected_revision

batch_update_presentation

Apply Slides API requests

Any Google Slides API batchUpdate: slides (create, duplicate, reorder, delete, background), shapes, text boxes, images (by URL, or local files through `images`), videos, lines, tables (rows, columns, merges, cell and border styles), Sheets charts, text and its styles, bullets, replace all text or shapes with images, transforms, z-order, alt text and the rest. One atomic batch, checked against the API's schema before anything is sent. Ids you choose for new objects (5 to 50 characters, starting with a letter or _) can be referred to by later requests in the same batch. expected_revision (from get_presentation) refuses the batch if the deck changed. Returns the new revisionId and the replies that carry ids, by request position.

輸入參數imagesaccount必填requests必填presentation_id必填expected_revision

batch_update_spreadsheet

Apply Sheets API requests

Any Google Sheets API batchUpdate: sheets (add, duplicate, delete, properties), rows and columns (insert, delete, move, resize, group, hide), cells (values with formats, repeat a format, borders, merges, copy/cut/paste, sort, find and replace, data validation, autofill), conditional formatting, filters and filter views, protected, named and banded ranges, charts, slicers, tables, pivots (as cell data) and developer metadata. One atomic batch, checked against the API's schema before anything is sent. Where a request takes a GridRange, GridCoordinate or DimensionRange, A1 naming the sheet works too ("Sheet1!A1:C10", "Sheet1!B3", "Sheet1!3:5" for rows, "Sheet1!B:D" for columns); a sheet added in the same batch is named by the sheetId set in its addSheet. Colours are {red, green, blue} from 0 to 1. Returns the replies that carry ids or counts, by request position.

輸入參數account必填requests必填spreadsheet_id必填

clear_values

Clear cell values

Empty the values of several A1 ranges (or the cells data_filters choose), keeping their formatting, validation and notes. Returns the ranges cleared.

輸入參數rangesaccount必填data_filtersspreadsheet_id必填

complete_task

Complete task

Mark a task done, or open again with completed: false. A task already in that state is left as it is.

輸入參數account必填task_id必填completedtask_list

copy_file

Copy a file

Copy one file to a folder, retaining native Google formats and formulas. Does not copy folders, comments or version history. Refuses existing names; inspect the destination after an uncertain response before retrying. Original is unchanged.

輸入參數namefile_id必填destination_id必填expected_modified

copy_sheet_to

Copy a sheet to another spreadsheet

One sheet, with its formats, charts and validation, copied into another spreadsheet (or the same one when destination is empty). It arrives last, titled "Copy of <title>"; returns its sheetId and title.

輸入參數sheetaccount必填spreadsheet_id必填destination_spreadsheet_id

create_deck_from_outline

Create a deck from an outline

Copy a template deck through Drive, then add one slide per outline entry from the named layout, filling its title/subtitle/body placeholders and speaker notes, and delete the template's own slides unless kept. The outline is checked against the template before anything is copied.

輸入參數title必填account必填outline必填folder_idfolder_pathtemplate_id必填keep_template_slides

create_document

Create a Google Doc

A new Google Doc from markdown, in a Drive folder or My Drive's root. Returns its id and link.

輸入參數title必填account必填markdownfolder_idfolder_path

create_draft

Create draft

Save a NEW message as a draft. The default path for anything addressed to someone: nothing leaves the mailbox, and the result carries the draft's webUrl for the user to review and send. For an answer to an existing message use reply (it drafts by default and threads properly), not this.

輸入參數cctobccfromaccount必填subjectbody_htmlbody_textattachments

create_event

Create event

Add an event to one account's calendar. Needs title and start; a timed event with no end lasts an hour. Times without an offset are in UTC. Guests are NOT emailed unless send_updates says so. meet: true gives it a new Google Meet link. event_type makes focus time or an out of office block instead of an appointment (title optional for those).

輸入參數endbusymeetstarttitleaccount必填locationattendeesevent_typerecurrencecalendar_idchat_status另有 6 個

create_filter

Create filter

Create a Gmail filter for mail that arrives from now on. Actions are labels, by name or id: add a label to file it; remove INBOX to skip the inbox, UNREAD to mark it read; add STARRED or IMPORTANT. Adding TRASH or SPAM needs discard: true, since such mail is never seen. No forwarding. It does not touch mail already there: the result's filter.query is the search to give modify_labels_matching for that. Gmail has no filter update; to change one, create the new one and delete the old. Needs the gmail.settings.basic scope on the account's grant, and says so if it is missing.

輸入參數toaddfromqueryremoveaccount必填discardsubjectnegated_queryhas_attachment

create_folder

Create a folder

Create a folder and every missing folder above it, in one call. Returns which levels it had to create, so a typo shows up as a folder you did not expect to be new.

輸入參數path必填

create_label

Create label

Create a user label. Nest it under another with a slash in the name, e.g. 'Clients/Acme'.

輸入參數name必填account必填text_colorbackground_colorlabel_list_visibilitymessage_list_visibility

create_presentation

Create a blank deck

A new, blank Google Slides deck in a Drive folder or My Drive's root, to build with batch_update_presentation. Returns its id, link, revisionId and the object id of the title slide Slides gives every new deck.

輸入參數title必填account必填folder_idfolder_path

create_spreadsheet

Create a spreadsheet

A new Google Sheet, optionally with named sheets and bold, frozen header rows, in a Drive folder or My Drive's root.

輸入參數title必填sheetsaccount必填folder_idfolder_path

create_task

Create task

Add a task to one account's list. Needs a title; notes and a due date are optional. parent makes it a subtask of another task in the same list; previous places it after that sibling (first otherwise).

輸入參數duenotestitle必填parentaccount必填previoustask_list

create_task_list

Create task list

A new Google Tasks list in one account; returns its taskListId.

輸入參數title必填account必填

delete_comment

Delete a comment or reply

Delete a comment thread with its replies, or one reply with reply_id. Drive lets an account delete only what it wrote (owners excepted).

輸入參數account必填file_id必填reply_idcomment_id必填

delete_draft

Delete draft

Delete a draft permanently (drafts do not go to Trash). The draft's message is gone with it.

輸入參數account必填draft_id必填

delete_event

Delete event

Delete an event (an instance id from agenda deletes that one occurrence; a series id, every occurrence, is refused unless scope is "series"). On an event someone else organised this removes it from this calendar only; to say no, use respond_to_invite with declined.

輸入參數scopeaccount必填event_id必填calendar_idsend_updates

delete_filter

Delete filter

Delete a Gmail filter by id (list_filters). Mail it already filed keeps its labels.

輸入參數account必填filter_id必填

delete_label

Delete label

Delete a user label, given by id or name. It is removed from every message that carries it; the messages themselves are untouched. System labels are refused.

輸入參數label必填account必填

describe_file

Describe one file

Everything Drive reports about a single file or folder, by id or path.

輸入參數pathfile_id

download_file

Download a file from Drive

Save a file from Drive into /home/sandbox/.local/state/mcps/google/drive/downloads, which you can read, and prove it: the bytes are checked against Drive's own checksum before anything is written, so a damaged download is never saved. For a file no local copy has yet, or one known only by its id. A Google Doc, Sheet, Slides deck or Drawing has no bytes and is exported instead (a Doc as pdf, a Sheet as xlsx, Slides as pptx, a Drawing as png, unless format says otherwise). An earlier download of the same name in that folder is replaced. Returns the file with the saved path, size, sha256, md5 and verifiedBy (exportedAs for a Google file).

輸入參數pathformatfile_idfilenamesave_dir

download_revision

Save an old revision

One revision of a file into the downloads folder: a file with bytes as it was, checked against the revision's MD5; a Google file exported (a Doc as PDF unless `format` says otherwise). Returns the path, size and sha256. To roll back, upload it as a new version.

輸入參數formataccountfile_id必填filenamesave_dirrevision_id必填

drive_changes

What changed since the cursor

Every file created, edited, moved, trashed or removed since the cursor, and a new cursor to use next time. Only the delta comes back, so this costs the same whether the Drive holds 20 files or 20,000. Call it again while exhausted is false to drain the backlog.

輸入參數limitcursor必填

edit_comment

Edit a comment or reply

New text for a comment, or for one of its replies with reply_id. Drive lets an account edit only what it wrote.

輸入參數account必填content必填file_id必填reply_idcomment_id必填

edit_document_section

Replace a section of a Google Doc

Replace everything under one heading (its subsections included) with markdown, keeping the heading. Read the section with read_document first and pass its revisionId: the edit is one batch, pinned to that revision. Headings in the new body must be deeper than the section's own. Refused when the section holds images, footnotes or other things read_document does not show (drop_hidden: true deletes them), and for an empty body (clear: true empties the section). Returns the document's title and the section's size before and after, in characters of markdown.

輸入參數tabclearaccount必填section必填markdown必填document_id必填drop_hiddenexpected_revision必填

editors_api_reference

Docs, Sheets and Slides API reference

What a Google Docs, Sheets or Slides batchUpdate request takes, from the API's own schema (the revision batch_update_document, batch_update_spreadsheet and batch_update_presentation check against): each field's type, allowed values and meaning, with the types it refers to expanded `depth` levels down (`more` lists the rest by name). Name a request kind (updateTextStyle, repeatCell, createShape) or any type (TextStyle, CellFormat, PageElementProperties); with no name, every request kind and its one-line summary. Kinds marked Developer Preview need the Cloud project in Google's preview program.

輸入參數api必填namedepth

fill_placeholders

Fill {{tags}} in a deck

Replace every {{tag}} with its value (exact case) across the deck, or only the slides named. Reports how many of each were found.

輸入參數values必填account必填slide_idspresentation_id必填

find_files

Search Drive

Search the whole Drive without listing it. Combine any of name_contains, full_text, mime_type, parent_id and modified_after; they are ANDed. This is the tool to reach for instead of walking folders, or a local copy of the Drive, which costs a full tree scan for the same answer.

輸入參數limitfull_textmime_typeparent_idname_containsmodified_afterinclude_trashed

find_in_document

Find text in a Google Doc

Every place a text appears in one tab of a Google Doc (body, headers, footers and footnotes unless segments is body), as ranges [startIndex, endIndex) to use in batch_update_document (with tabId and, outside the body, segmentId), each with its paragraph's range and named style. Returns the revisionId the ranges are right for. With regex, text is a JavaScript regular expression (run under a time limit); a match never crosses a paragraph.

輸入參數tabtext必填regexaccountsegmentsmatch_casewhole_worddocument_id必填max_results

find_people

Find people

Find a person's email address by name, across every account at once: each account's contacts, the addresses Gmail saved from mail it sent or received ('other'), and a Workspace domain's directory. The query matches the start of a name, an address, a phone number or an organisation. One entry per person, merged by address, with every account and source it was found in; a source an account cannot read is listed under `unavailable` with the reason. Use it before addressing a draft or an invitation to someone named.

輸入參數limitquery必填accountsources

find_time

Find time

Candidate slots of `duration_minutes` across EVERY account (and optional `attendees`), inside working hours (default Mon-Fri 09:00-18:00 UTC), after a minimum notice, clear of existing events plus buffers, on a step grid, ranked earliest first or with mornings/afternoons first. Returns `slots` (overlapping candidates, e.g. 09:00 and 09:30 for an hour) and `ranges` (the free stretches they come from). Tentative events block time unless `tentative_is_free`. If some busy time could not be read, `complete` is false and `unknown` says what.

輸入參數todaysfrompreferaccountattendeescalendarshours_endtime_zonehours_startmax_resultsstep_minutes另有 6 個

format_range

Format a range

Number format, bold/italic, colours, alignment, wrapping, borders and frozen rows/columns for a range. Only what is given changes.

輸入參數boldwraprange必填italicaccount必填bordersbackgroundforegroundfreeze_rowsnumber_formatfreeze_columnsspreadsheet_id必填另有 2 個

forward

Forward

Forward a message WITH its attachments, under Gmail's 'Forwarded message' block, with an optional note above it (body_text / body_html). Creates a DRAFT unless send is true. Extra attachments can be added.

輸入參數cctobccfromsendaccount必填subjectbody_htmlbody_textmessage_id必填attachmentsinclude_attachments

free_busy

Free/busy

When the user is busy across EVERY account in a window, per calendar, plus one merged, de-duplicated `busy` timeline that also covers any `attendees`. Busy means: not cancelled, not "show as available", not declined; tentative events and "maybe" answers count as busy and are flagged `tentative`; an all-day event left as busy blocks its whole day. Anything that could not be read is listed under `unknown` and `complete` is false.

輸入參數todaysfromaccountattendeescalendars

get_attachment

Download attachment

Download one attachment to disk by message_id + attachment_id (both come from get_thread). This is the capability Google's own Gmail MCP server does not have: it reports an attachment's name and id and gives you no way to fetch the bytes. Returns the path, size and sha256; a download whose size differs from the one Gmail reports for the part is refused and nothing is saved. A different file already saved under the name is kept, and this one is saved as "name (2).ext".

輸入參數accountfilenamesave_dirmessage_id必填attachment_id必填

get_document

Read a Google Doc's structure

A Google Doc's structure with the indices batch_update_document needs: every tab, and for one tab its body as elements (paragraphs with named style, heading id, bullet, styled runs and objects such as images or footnote marks; tables with each cell's range and content; section breaks; tables of contents), each with range [startIndex, endIndex). A paragraph's `text` holds one U+FFFC per non-text index, so offset k of text is index range[0]+k; its newline is range[1]-1. Styles are shown short ("11pt", "#1a73e8"); in requests write {magnitude: 11, unit: "PT"} and {color: {rgbColor: {red, green, blue}}} (0 to 1). `parts` adds headers, footers, footnotes, lists, named ranges, objects (image sizes and sources) and styles (page setup, named styles); `notShown` says what exists beyond them. A long body is cut at an element (`nextIndex`: read on with start_index). format raw returns the API's JSON, narrowed by `fields`. Returns revisionId for expected_revision. For prose, read_document's markdown is cheaper.

輸入參數tabpartsfieldsformataccountend_indexmax_charsdocument_id必填start_indexsuggestions

get_draft

Get draft

One draft: its message (headers, Bcc included, bodies and attachments) and its webUrl.

輸入參數detailaccountdraft_id必填

get_event

Get event

One event in full: description, guest list with each answer, reminders, meeting link, recurrence.

輸入參數accountevent_id必填calendar_id

get_message

Get message

Fetch a single message by id. See get_thread for the detail levels and the account rule.

輸入參數detailaccountmessage_id必填

get_messages

Get messages

Fetch several messages of one mailbox in one call, up to 25 ids, in the order given (a repeated id once). Use it after list_history or a search when you need the bodies of messages from different threads. A message that cannot be read comes back as {id, partial: true, reason} in its place and the others still arrive. See get_thread for the detail levels and the account rule; 'metadata' keeps a long list cheap.

輸入參數detailaccountmessage_ids必填

get_presentation

Read a deck's structure

A Google Slides deck's structure with the object ids batch_update_presentation needs: per slide its layout, every element (shapes with type, placeholder and full text, images, tables cell by cell, lines, videos, Sheets charts, groups) with size and transform, and the speaker notes' shape id; plus layouts, masters and the page size. A shape's text is exact, so offset k is index k for insertText and text ranges. Sizes show as "3000000 EMU"; requests take {magnitude, unit}. A long deck is cut at a slide (`nextSlide`: read on with from_slide). format raw returns the API's JSON, narrowed by `fields`. Returns revisionId.

輸入參數fieldsformataccountmax_charsslide_idsfrom_slidepresentation_id必填

get_spreadsheet

Read a spreadsheet's structure

A spreadsheet's structure with the ids batch_update_spreadsheet needs: per sheet its sheetId, size, frozen rows and columns, merges, conditional format rules (with their index), basic filter, filter views, protected and banded ranges, charts, slicers, tables and row/column groups, plus named ranges; ranges as A1. No cell data (get_values, read_rows). format raw returns the API's JSON for `ranges`, with grid data if asked, narrowed by `fields`: the way to read cell formats, notes, validation and pivots.

輸入參數fieldsformatrangesaccountmax_charsdata_filtersspreadsheet_id必填include_grid_data

get_thread

Get thread

Fetch one thread with all its messages, their attachment metadata and their bodies. Thread ids are per-mailbox: pass the account that search_threads reported alongside the id.

輸入參數detailaccountthread_id必填

get_thumbnails

Slide thumbnails

A PNG thumbnail URL per slide, rendered by Google. The URLs expire after about half an hour.

輸入參數sizeaccountpresentation_id必填

get_transcript

Get transcript

A Meet transcript as text, one line per thing said: "[0:12:05] Ana Popescu: ...", the time counted from when the transcript began. Long ones come in parts of about max_chars; pass nextPageToken back to read on. The transcript is the name list_meetings gives (conferenceRecords/.../transcripts/...).

輸入參數accountmax_charspage_tokentranscript必填

get_values

Read cell values

Values of several A1 ranges in one read, as Sheets renders them (FORMATTED_VALUE), as numbers (UNFORMATTED_VALUE: a double, so read_rows is the tool for money) or as formulas (FORMULA), chosen by A1 ranges or by data_filters. A large answer is cut at a row (`totalRows` says how many there were).

輸入參數rangesaccountmax_charsdata_filtersvalue_renderspreadsheet_id必填major_dimensiondate_time_render

harvest_attachments

Harvest attachments for a query

Every attachment matching a Gmail query, downloaded to a folder in ONE call, with a manifest. Use it for a month of invoices ('has:attachment after:2026/08/01 before:2026/09/01') instead of walking threads and calling get_attachment per file. Do NOT use Gmail's own 'download all attachments' zip as an alternative: it is keyed by thread id and silently omits parts keyed by message id. Returns counts (threadsMatched, attachmentsFound, savedCount) so the harvest can be reconciled against Gmail's own has:attachment count, each saved file with its size and sha256, plus a per-file failure list. Files are named <message id>-<filename>; two of one name both survive. A client that asks for progress hears each attachment saved, out of how many; cancelling stops the harvest, which then ends as cancelled.

輸入參數queryaccountsave_dirextensionsmax_threadsmax_attachments

health

Health

Check that every grant is alive, per product and per account. Under `gmail`, per grant: the mailbox each credential resolves to, the scope Google actually GRANTED (not the one credentials.json declares), whether it can write, and the OAuth client the live token belongs to; an account may hold its own gmail.modify grant and a gmail.readonly one, and `activeGrant` is the one the tools use. Under `calendar`: that the grant refreshes, which account it resolves to (the consent screen offers every account signed in), and whether it carries the scopes the tools need. Under `drive`: which account the grant acts as and the storage used. Under `editors` (Docs, Sheets, Slides), per account: the address, the granted scopes, and whether each of the three APIs is enabled in the grant's Cloud project. Under `tasks`, `contacts` and `meet`, per account with a grant: the address, the granted scopes, and whether the API answers (`disabled` when its Cloud project has not enabled it); contacts also says which sources it reads. Under `config`: where the state directory, the OAuth client, the mailboxes and each account's address come from (a variable, or what setup or a consent saved; a variable that is set wins). Checks EVERY account by default. Run this before concluding the server is broken, and before retrying a write that refused.

輸入參數account

list_accounts

List accounts

The Google accounts this server reaches, per product. Start here: every other tool takes one of these labels. Under `gmail`: the mailboxes, which one a tool uses when no account is given, and which grant each runs on: `modify` (its own; the write tools work) or `readonly` (a read-only grant; the write tools refuse). Under `calendar`: the accounts whose calendars it reaches, the address each grant must resolve to, and the time zone. Under `drive`: which grant Drive runs on (its own once begin_consent made one, else an rclone remote's when one is configured). Under `editors`: the accounts Docs, Sheets and Slides can act as (one may run on the Drive grant; any other needs a grant made with begin_consent). Under `tasks`, `contacts` and `meet`: the accounts with a grant for Google Tasks, for contacts and the directory, and for Meet's records. Says nothing about whether a grant is alive; that is health, which costs a round trip to Google.

無需輸入參數。

list_calendars

List calendars

Every calendar each account can see (its own, shared ones, subscriptions, holidays), with its id, the account's access to it, and whether agenda reads it by default.

輸入參數account

list_comments

List a file's comments

The comment threads on a Doc, Sheet, deck or any Drive file, each with its author, time, text, the text it quotes, whether it is resolved, and its replies (with any resolve or reopen action). Counts the open and resolved threads.

輸入參數accountfile_id必填max_resultsmodified_afterinclude_deletedinclude_resolved

list_drafts

List drafts

The account's drafts, newest first, with recipients, subject, snippet and each draft's webUrl.

輸入參數queryaccountpage_tokenmax_results

list_filters

List filters

The mailbox's Gmail filters: criteria, the labels each adds and removes (by name), and `query`, the search its criteria amount to, for applying it to mail already there with modify_labels_matching.

輸入參數account

list_folder

List a folder

The direct children of one folder. Give file_id or path; empty path means the root of My Drive. Google Docs come back with isNative true and bytes null, because a Doc has no stored bytes.

輸入參數pathlimitfile_idinclude_trashed

list_history

List history

Messages added since a historyId: incremental sync instead of re-searching the same window. Take the anchor from health's historyId, store it, pass it back next run. Anchors are per-mailbox, so keep one per account. Gmail expires old anchors: a 404 here means the anchor is too old and a full search_threads is needed to re-baseline.

輸入參數accountpage_tokenmax_resultsstart_history_id必填

list_labels

List labels

List Gmail labels (system and user-defined) for one account.

輸入參數account

list_layouts

List a deck's layouts

A deck's (or template's) layouts, by name, and the placeholders each has (TITLE, SUBTITLE, BODY, ...).

輸入參數accountpresentation_id必填

list_meetings

List meetings

The Google Meet meetings one account took part in, each with its transcripts, smart notes (Gemini's notes) and recordings, as Meet records them: for a calendar event (event_id from agenda: its Meet call, and for one occurrence the sitting that started within an hour of it), for a Meet link or code (meeting), or else for the last days (at most 30: Meet keeps records 30 days). A transcript or notes is a Google Doc: its document id opens with read_document; get_transcript reads a transcript as lines with who said what. Reading an event needs the account's calendar grant too.

輸入參數dayslimitaccountmeetingevent_idcalendar_id

list_permissions

Who has access to a file

Every permission on a Drive file: each person, group, domain or link with its role, expiry and id, whether it comes from a shared drive, and the link sharing in one line. Read it before share_file, update_permission or remove_permission.

輸入參數accountfile_id必填

list_revisions

List a file's revisions

A Drive file's revisions, oldest first: id, time, who made it, size and checksum for files with bytes, whether it is kept forever or published, and for a Doc, Sheet or deck the formats an old revision can be saved as with download_revision.

輸入參數accountfile_id必填

list_sheets

List a spreadsheet's sheets

A spreadsheet's title, locale, time zone and sheets (id, name, size, frozen rows).

輸入參數accountspreadsheet_id必填

list_task_lists

List task lists

Every Google Tasks list of each account (every account by default), with the taskListId the other task tools take; the default list is marked.

輸入參數account

list_tasks

List tasks

Tasks across every account by default, from every list unless task_list names one, in each list's own order. Open tasks only unless include_completed. due_from and due_to keep the tasks due between those dates (inclusive), which leaves out tasks with no due date. Each task carries account, taskListId and taskId for the write tools, parent when it is a subtask, and its link in Google Tasks. agenda with include_tasks shows the tasks due beside the events.

輸入參數limitdue_toaccountdue_fromtask_listinclude_completed

mark_spam

Mark as spam

Report threads or messages as spam: into SPAM and out of the inbox, as Gmail's own button does.

輸入參數ids必填targetaccount必填

modify_labels

Modify labels

Add and remove labels on threads or messages. In Gmail these ARE the everyday actions: archive = remove INBOX; mark read = remove UNREAD (unread = add it); star = add STARRED; important = IMPORTANT. Labels may be given by id or by name, case-insensitively. For threads, ids that failed are listed under `failed` beside the ones changed.

輸入參數addids必填removetargetaccount必填

modify_labels_matching

Modify labels on every match

Add and remove labels on EVERY thread a Gmail search matches, as Gmail's "select all conversations that match this search" does: file a sender under a label and archive it (add the label, remove INBOX), mark old mail read (remove UNREAD). A dry run by default: it returns how many threads match and a sample, and changes nothing. With dry_run false it refuses when the search matches more than `limit`, and otherwise changes every match, listing any thread that failed. To be able to find and reverse a large change later, also add a marker label created for it (e.g. 'cleanup/2026-10').

輸入參數addlimitquery必填removeaccount必填dry_run

move_file

Move files

Move one or many files into a folder, optionally renaming a single one. Sources are paths, or "id:<fileId>" to name one directly. Works the same for a Google Doc as for a PDF, which is the reason to use this instead of moving files in a synced local copy: moving a Doc's placeholder there deletes the Doc and uploads a small shortcut file in its place. Call with dry_run first; the plan names every collision.

輸入參數dry_runsources必填rename_todestination_iddestination_path

move_task

Move task

Move a task: under parent (a subtask; top level when omitted), after previous (first among its siblings when omitted), and into another list of the same account with to_list. A repeating task cannot change lists.

輸入參數parentaccount必填task_id必填to_listprevioustask_list

path_of

Path of an id

The reverse of resolve_path: where a file sits, as a path, by walking its parents to the root.

輸入參數file_id必填

read_deck

Read a deck

Every slide's layout, title, other text (tables as rows) and speaker notes, in order.

輸入參數accountpresentation_id必填

read_doc

Read a Google Doc

Export a Google Doc, Sheet or Slide deck as text and return it. Sheets come back as CSV. A Doc has no bytes to download, and this fetches its words in one request. Binary files are refused on purpose; download_file saves their bytes.

輸入參數pathformatfile_idmax_chars

read_document

Read a Google Doc

A Google Doc as markdown (headings, lists, tables, bold/italic/links), with an index of its sections: each heading's stable id and path ("Plan > Risks"). Pass `section` (an id, a path or a unique title) to read one section. Returns revisionId for a later edit's expected_revision. Reads the first tab unless `tab` names another; images, footnotes and the like are left out, and `notShown` counts them.

輸入參數tabaccountsectionmax_charsdocument_id必填

read_rows

Read rows

Rows as objects keyed by the header row. Values are typed: numbers stay numbers, dates are ISO strings (sheet-local time), and a currency cell is {value, amount, formatted} with `amount` its exact decimal string. Each row has `_row`, its row number. Empty rows are skipped.

輸入參數limitsheetoffsetaccountheader_rowspreadsheet_id必填

read_sheet_cells

Read formulas and linked cells

Sparse cells with entered formulas, shown values, hyperlinks, rich-text links, smart chips and notes. Row and column numbers are 1-based. offset counts physical rows; follow nextOffset until null. Use this before changing a link or formula, rather than inferring it from read_rows display text.

輸入參數limitsheetoffsetaccountspreadsheet_id必填

remove_permission

Remove someone's access

Remove one permission from a file: that person, group, domain or link loses access. Inherited shared-drive access cannot be removed here. It changes who can open the file: do it only on the user's explicit go for this file and these people.

輸入參數account必填file_id必填permission_id必填

rename_file

Rename a file

Change a file's name in place. Names cannot contain a slash; Drive has no path, only parents.

輸入參數pathfile_idnew_name必填

reply

Reply

Answer a message, threaded properly for every party: the original's threadId, In-Reply-To and References, a 'Re:' subject, and the recipients Gmail's own Reply picks (Reply-To when the original has one, else From; a reply to a message you SENT goes to its recipients). Goes out from the alias the original reached. Creates a DRAFT unless send is true. `to` replaces the computed recipients; `cc` and `bcc` add to them.

輸入參數cctobccfromsendquoteaccount必填subjectbody_htmlbody_textreply_allmessage_id必填另有 1 個

reply_to_comment

Reply to, resolve or reopen a comment

A reply on a comment thread, and/or its resolve or reopen (`action`), as the account; what the comment box's Reply and Resolve buttons do.

輸入參數actionaccount必填contentfile_id必填comment_id必填

resolve_path

Resolve a path to an id

Walk a path and return the id it names. A path is a QUERY on Drive, not an address: two objects may hold the same name in one folder, and this reports that as an error listing both ids rather than picking one. Use it before any tool that writes. A Drive name may itself contain a slash (Google Meet writes folders like "Weekly sync - 2030/01/15"); those are reachable only by id, which find_files returns.

輸入參數path必填

respond_to_invite

Respond to invite

Answer an invitation: accepted, declined or tentative. Changes only your own answer. The organiser sees it on the event either way; send_updates=all also emails them.

輸入參數account必填event_id必填response必填calendar_idsend_updates

search_developer_metadata

Find developer metadata

Developer metadata: key/value tags a program attaches to the spreadsheet, a sheet, or rows and columns (createDeveloperMetadata in batch_update_spreadsheet), which then name those cells in data_filters. One tag by metadata_id, or every tag data_filters match (e.g. [{"developerMetadataLookup": {"metadataKey": "invoice-table"}}]), each with where it is attached as A1.

輸入參數accountmetadata_iddata_filtersspreadsheet_id必填

search_threads

Search threads

Search threads with Gmail query syntax, e.g. 'from:billing.example.com after:2026/01/01 has:attachment', 'subject:invoice newer_than:30d', 'label:INBOX is:unread'. Searches EVERY registered mailbox by default and tags each result with the account it came from, so a question that does not know which mailbox holds the answer needs one call. Returns summaries; use get_thread for bodies.

輸入參數queryaccountpage_tokenmax_results

send_draft

Send draft

Send an existing draft as it stands. SENDING IS OUTWARD-FACING AND CANNOT BE UNDONE: only send when the user has explicitly approved THIS message (its recipients and its text) in the current conversation. Otherwise create a draft and give the user its webUrl. Returns the sent message's webUrl.

輸入參數account必填draft_id必填

send_message

Send message

Send a NEW message immediately. SENDING IS OUTWARD-FACING AND CANNOT BE UNDONE: only send when the user has explicitly approved THIS message (its recipients and its text) in the current conversation. Otherwise create a draft and give the user its webUrl. Prefer create_draft. To answer an existing message use reply, which threads it. Returns the sent message's webUrl.

輸入參數cctobccfromaccount必填subjectbody_htmlbody_textattachments

sender_breakdown

Sender breakdown

Who the threads matching a query come from: per sending domain, busiest first, the thread and unread counts, the newest and oldest date, and its busiest addresses. The starting point for sorting a mailbox into labels and filters. A thread's sender is the author of its latest message you did not send. One mailbox per call. A few hundred threads take seconds; past that Gmail's quota allows about 25 threads a second, so a 3000-thread inbox takes about two minutes.

輸入參數toplimitqueryaccount

share_file

Share a file

Give a person or group (email_address), a domain, or anyone with the link access to a Drive file, as reader, commenter, writer (organizer roles on shared drives), with an optional expiry. Drive's email goes out only with notify: true, with `message` in it. Making someone the owner needs transfer_ownership: true. It changes who can open the file: do it only on the user's explicit go for this file and these people.

輸入參數role必填type必填domainnotifyaccount必填file_id必填messagediscoverableemail_addressexpiration_timetransfer_ownership

start_drive_cursor

Mint a change cursor

A token meaning "from now on". Keep it, and hand it to drive_changes later. This is the cheap half of keeping anything in step with Drive: one call, no listing.

無需輸入參數。

trash

Trash

Move threads or messages to Trash, where Gmail keeps them 30 days. There is no permanent delete here. Returns the ids trashed, and any that failed under `failed`.

輸入參數ids必填targetaccount必填

trash_file

Move to trash

Send a file to Drive's trash, where it stays recoverable for 30 days. There is deliberately no permanent-delete tool here: the one operation that cannot be undone is the one this server does not expose.

輸入參數pathfile_id

unmark_spam

Not spam

Take threads or messages out of SPAM and back into the inbox.

輸入參數ids必填targetaccount必填

untrash

Untrash

Bring threads or messages back out of Trash. Returns the ids restored, and any that failed under `failed`.

輸入參數ids必填targetaccount必填

untrash_file

Restore from trash

Take a file back out of the trash. Find it by id; a trashed file no longer answers to its path.

輸入參數pathfile_id

update_draft

Update draft

Change an existing draft. Only the fields you pass change; everything else, including a reply draft's threading, is kept. Passing either body replaces both bodies. Attachments are kept unless you pass a list, and an empty list removes them.

輸入參數cctobccfromaccount必填subjectdraft_id必填body_htmlbody_textattachments

update_event

Update event

Change an event. Only the fields given change; a new start with no end keeps the event's length. On a recurring event, the eventId decides the reach: an instance id from agenda changes that one occurrence, and a series id (every occurrence) is refused unless scope is "series". attendees replaces the guest list, and the result says who that added and removed. Guests are NOT emailed unless send_updates says so. meet: true adds a Meet link to an event without one. An event's type cannot change; a focus time or out of office event takes new auto_decline, decline_message and chat_status.

輸入參數endbusymeetscopestarttitleaccount必填event_id必填locationattendeesrecurrencecalendar_id另有 7 個

update_label

Update label

Rename or restyle a user label, given by id or name. System labels (INBOX, SENT, ...) are refused.

輸入參數namelabel必填account必填text_colorbackground_colorlabel_list_visibilitymessage_list_visibility

update_permission

Change someone's access

A permission's role or expiry (or its expiry removed). Making someone the owner needs transfer_ownership: true. It changes who can open the file: do it only on the user's explicit go for this file and these people.

輸入參數roleaccount必填file_id必填permission_id必填expiration_timeremove_expirationtransfer_ownership

update_revision

Keep or publish a revision

keep_forever stops Drive pruning a revision of a file with bytes. published puts a Doc, Sheet or deck revision on the web for anyone at its publishedLink (publish_auto follows later revisions, published_outside_domain lets people outside the domain read it): only on the user's explicit go.

輸入參數account必填file_id必填publishedrevision_id必填keep_foreverpublish_autopublished_outside_domain

update_task

Update task

Change a task's title, notes or due date. Only the fields given change, and only when they differ: an empty notes or due clears it. To mark it done use complete_task; to move it, move_task.

輸入參數duenotestitleaccount必填task_id必填task_list

update_values

Write cell values

Values or formulas into several A1 ranges in one call (values.batchUpdate). Returns the cells updated per range (and what they now show, with include_values). write_range is the one-range variant that returns what the cells held before.

輸入參數data必填account必填value_inputinclude_valuesspreadsheet_id必填major_dimension

upload_file

Upload a file to Drive

Put a file on Drive byte for byte and prove it: after the upload, Drive's own checksum of what it stored (or the bytes read back, when Drive reports none) is compared with the source's. A difference fails the call and is taken back: a replacement's damaged revision is deleted, a new file is trashed. The file goes as path (a file in your workspace folders (the roots this client shares with the server; without them /workspace/mcp-validate); a bare name is taken from the first) or as content_base64 with its sha256. Never type or paste a file's base64 yourself: a retyped file can arrive changed. Give the path of a file in your workspace folders (the roots this client shares; without them /workspace/mcp-validate), or have a script that read the file send content_base64 with its sha256. The folder is folder_id, else folder_path, else the root. A name already in the folder is refused unless if_exists says what to do. A file given by path keeps its modification time on Drive. Returns the stored file with its link, size, sha256, md5 and verifiedBy. With convert, an Office file (.docx, .doc, .xlsx, .xls, .csv, .pptx, .ppt) becomes a Google Doc, Sheet or deck instead, named without its extension; a converted file keeps no bytes to compare, so the check is that Drive made the Google type, and the result gives the source's size and sha256 under `source`.

輸入參數pathsha256convertfilenamefolder_idif_existsmime_typefolder_pathcontent_base64

upsert_rows

Upsert rows by key

Update the rows whose `key` column matches (only the columns given change), append the rest. One atomic batch. A key on two sheet rows is refused.

輸入參數key必填rows必填sheetaccount必填header_rowspreadsheet_id必填

write_range

Write a range

Values or formulas into an A1 range that names its sheet ("Invoices!A2:C4"), parsed as if typed (USER_ENTERED): "=SUM(B2:B9)" is a formula, "28/09/2026" a date in the sheet's locale. Returns `before`, what those cells held (formulas as formulas), so the write can be undone by writing it back.

輸入參數range必填values必填account必填spreadsheet_id必填

版本歷史

3
  1. v0.2.0最新Nov 3, 2026
  2. v0.1.1Oct 31, 2026
  3. v0.1.0Oct 26, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分