# Google Drive — how to use (mcp.ai)

Search, read and organize Google Drive files from your AI agent.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_googledrive?ms=1796396040000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `googledrive_list`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/googledrive`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://new.mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/googledrive/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/googledrive/add/file/sharing/preference` — DEPRECATED: Use GOOGLEDRIVE_CREATE_PERMISSION instead; use GOOGLEDRIVE_UPDATE_PERMISSION to modify existing permissions (avoids duplicate entries). Modifies sharing permissions for an existing Google 
  - body: { role: string, type: string, domain?: string, file_id: string, email_address?: string, transfer_ownership?: boolean }
- `POST https://api.mcp.ai/api/googledrive/copy/file` — DEPRECATED: Use GOOGLEDRIVE_COPY_FILE_ADVANCED instead. Duplicates an existing file (not folders) in Google Drive by `file_id`; copy lands in same folder as original — use GOOGLEDRIVE_MOVE_FILE afterw
  - body: { file_id: string, new_title?: string }
- `POST https://api.mcp.ai/api/googledrive/create/comment` — Tool to create a comment on a file in Google Drive. Returns a nested `data` object; extract `data.id` for the resulting comment identifier. Omit `anchor` and `quoted_file_content_*` for general file-l
  - body: { anchor?: string, content: string, file_id: string, quoted_file_content_value?: string, quoted_file_content_mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/create/drive` — Tool to create a new shared drive. Use when you need to programmatically create a new shared drive for collaboration or storage.
  - body: { name: string, hidden?: boolean, themeId?: string, colorRgb?: string, requestId?: string, backgroundImageFile?: object }
- `POST https://api.mcp.ai/api/googledrive/create/file` — Creates a new file or folder in Google Drive. Supports both metadata-only creation (for folders and empty documents) and file upload with content. When file_to_upload is provided, uploads the actual f
  - body: { name?: string, fields?: string, parents?: string[], starred?: boolean, mimeType?: string, description?: string, file_to_upload?: object }
- `POST https://api.mcp.ai/api/googledrive/create/file/from/text` — Creates a new file in Google Drive from provided text content (up to 10MB), supporting various formats including automatic conversion to Google Workspace types. Returns flat metadata fields (`id`, `mi
  - body: { file_name: string, mime_type?: string, parent_id?: string, text_content: string }
- `POST https://api.mcp.ai/api/googledrive/create/folder` — Creates a new folder in Google Drive, optionally within an EXISTING parent folder specified by its ID or name. The parent folder MUST already exist - use GOOGLEDRIVE_FIND_FOLDER first to verify the pa
  - body: { name: string, parent_id?: string }
- `POST https://api.mcp.ai/api/googledrive/create/reply` — Tool to create a reply to a comment in Google Drive. Use when you need to respond to an existing comment on a file.
  - body: { action?: string, fields?: string, content: string, file_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/create/shortcut/to/file` — Tool to create a shortcut to a file or folder in Google Drive. Use when you need to link to an existing Drive item from another location without duplicating it. The shortcut receives its own distinct 
  - body: { name: string, target_id: string, includeLabels?: string, supportsAllDrives?: boolean, keepRevisionForever?: boolean, ignoreDefaultVisibility?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/delete/comment` — Permanently deletes a comment thread (and all its replies) from a Google Drive file — this action is irreversible. To remove only a single reply within a thread, use GOOGLEDRIVE_DELETE_REPLY instead. 
  - body: { file_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/delete/drive` — Tool to permanently delete a shared drive. Use when you need to remove a shared drive and its contents (if specified).
  - body: { driveId: string, allowItemDeletion?: boolean, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/delete/permission` — Deletes a permission from a file by permission ID. Deletion is irreversible — confirm the target user, group, or permission type before executing. IMPORTANT: You must first call GOOGLEDRIVE_LIST_PERMI
  - body: { file_id: string, permission_id: string, supportsAllDrives?: boolean, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/delete/reply` — Tool to delete a specific reply by reply ID. Deletion is irreversible; obtain explicit user confirmation before calling. Removes only the targeted reply, not the full comment thread — use GOOGLEDRIVE_
  - body: { file_id: string, reply_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/download/file` — Downloads a file from Google Drive by its ID. For Google Workspace documents (Docs, Sheets, Slides), optionally exports to a specified `mime_type`. For other file types, downloads in their native form
  - body: { fileId: string, mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/edit/file` — Updates an existing Google Drive file with binary content by overwriting its entire content with new text (max 10MB). IMPORTANT: This action only works with files that have binary content (text files,
  - body: { content: string, file_id: string, mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/empty/trash` — Tool to permanently and irreversibly delete ALL trashed files in the user's Google Drive or a specified shared drive. Recovery is impossible after execution — no Drive tool can restore items once tras
  - body: { driveId?: string, enforceSingleParent?: boolean }
- `POST https://api.mcp.ai/api/googledrive/find/file` — The comprehensive Google Drive search tool that handles all file and folder discovery needs. Use this for any file finding task - from simple name searches to complex queries with date filters, MIME t
  - body: { q?: string, fields?: string, spaces?: string, corpora?: string, driveId?: string, orderBy?: string, pageSize?: integer, folder_id?: string, pageToken?: string, include_labels?: string, pagetoken_dropped?: boolean, supportsAllDrives?: boolean, original_email_query?: string, editors_field_removed?: boolean, email_query_transformed?: boolean, orderby_size_transformed?: boolean, original_bare_text_query?: string, includeItemsFromAllDrives?: boolean, emailaddress_field_removed?: boolean, original_invalid_pagetoken?: string, bare_text_query_transformed?: boolean, include_permissions_for_view?: string }
- `POST https://api.mcp.ai/api/googledrive/find/folder` — Finds one page of Google Drive folders by name and optional parent. Use nextPageToken with page_token to retrieve additional pages.
  - body: { starred?: boolean, page_size?: integer, name_exact?: string, page_token?: string, name_contains?: string, modified_after?: string, parent_folder_id?: string, name_not_contains?: string, full_text_contains?: string, full_text_not_contains?: string }
- `POST https://api.mcp.ai/api/googledrive/generate/ids` — Generates a set of file IDs which can be provided in create or copy requests. Use when you need to pre-allocate IDs for new files or copies.
  - body: { type?: string, count?: integer, space?: string }
- `POST https://api.mcp.ai/api/googledrive/get/about` — Tool to retrieve information about the user, the user's Drive, and system capabilities. Use when you need to check storage quotas, user details, or supported import/export formats. Note: storageQuota 
  - body: { fields?: string }
- `POST https://api.mcp.ai/api/googledrive/get/changes/start/page/token` — Tool to get the starting pageToken for listing future changes in Google Drive. Returns only a token — pass it to GOOGLEDRIVE_LIST_CHANGES to retrieve actual changes. Persist this token; losing it requ
  - body: { driveId?: string, teamDriveId?: string, supportsAllDrives?: boolean, supportsTeamDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/comment` — Tool to get a comment by ID. Use when you need to retrieve a specific comment from a Google Drive file and have both the file ID and comment ID.
  - body: { fileId: string, commentId: string, includeDeleted?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/drive` — Tool to get a shared drive by ID. Use when you need to retrieve information about a specific shared drive. To discover drive_ids, use GOOGLEDRIVE_LIST_SHARED_DRIVES first; GOOGLEDRIVE_GET_ABOUT reflec
  - body: { drive_id: string, use_domain_admin_access?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/file/metadata` — Tool to get a file's metadata by ID. Use to verify `mimeType`, `parents`, and `trashed` status before destructive operations (delete/move/export), or to confirm `mimeType='application/vnd.google-apps.
  - body: { fields?: string, fileId: string, includeLabels?: string, supportsAllDrives?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/get/permission` — Gets a permission by ID. Use this tool to retrieve a specific permission for a file or shared drive. Newly created or updated permissions on shared drives may have a brief propagation delay before app
  - body: { fields?: string, file_id: string, permission_id: string, supports_all_drives?: boolean, use_domain_admin_access?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/reply` — Tool to get a specific reply to a comment on a file. Use when you need to retrieve the details of a particular reply.
  - body: { fileId: string, replyId: string, commentId: string, includeDeleted?: boolean }
- `POST https://api.mcp.ai/api/googledrive/get/revision` — Tool to get a specific revision's metadata (name, modifiedTime, keepForever, etc.) by revision ID. Returns metadata only — not file content. Use a separate download tool to retrieve file content or re
  - body: { file_id: string, revision_id: string, acknowledge_abuse?: boolean }
- `POST https://api.mcp.ai/api/googledrive/google/drive/delete/folder/or/file/action` — Tool to delete a file or folder in Google Drive. Use when you need to permanently remove a specific file or folder using its ID. Note: This action is irreversible. Deleting a folder permanently remove
  - body: { fileId: string, supportsAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/hide/drive` — Tool to hide a shared drive from the default view. Use when you want to remove a shared drive from the user's main Google Drive interface without deleting it.
  - body: { drive_id: string }
- `POST https://api.mcp.ai/api/googledrive/list/changes` — Tool to list the changes for a user or shared drive. Use when a full incremental change feed is needed (for simple recent-file lookups, prefer GOOGLEDRIVE_FIND_FILE instead). Tracks modifications such
  - body: { spaces?: string, driveId?: string, pageSize?: integer, pageToken?: string, includeLabels?: string, includeRemoved?: boolean, restrictToMyDrive?: boolean, supportsAllDrives?: boolean, includeCorpusRemovals?: boolean, includeItemsFromAllDrives?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/list/comments` — Tool to list all comments for a file in Google Drive. Results are paginated; iterate using nextPageToken until absent to retrieve all comments. Filtering by author, content, or other criteria must be 
  - body: { fields?: string, fileId: string, pageSize?: integer, pageToken?: string, includeDeleted?: boolean, startModifiedTime?: string }
- `POST https://api.mcp.ai/api/googledrive/list/file/labels` — Tool to list the labels already applied to a file in Google Drive. An empty labels array is a valid response indicating no labels are applied, not an error. This tool shows only applied labels; label_
  - body: { file_id: string, page_token?: string, max_results?: integer }
- `POST https://api.mcp.ai/api/googledrive/list/files` — DEPRECATED: Use GOOGLEDRIVE_FIND_FILE instead. Tool to list a user's files and folders in Google Drive. Use this to search or browse for files and folders based on various criteria.
  - body: { q?: string, fields?: string, spaces?: string, corpora?: string, driveId?: string, orderBy?: string, folderId?: string, pageSize?: integer, pageToken?: string, includeLabels?: string, supportsAllDrives?: boolean, includeItemsFromAllDrives?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/list/permissions` — Tool to list a file's permissions. Use when you need to retrieve all permissions associated with a specific file or shared drive.
  - body: { fileId: string, pageSize?: integer, pageToken?: string, supportsAllDrives?: boolean, useDomainAdminAccess?: boolean, includePermissionsForView?: string }
- `POST https://api.mcp.ai/api/googledrive/list/replies` — Tool to list replies to a comment in Google Drive. Use this when you need to retrieve all replies associated with a specific comment on a file.
  - body: { fields?: string, file_id: string, page_size?: integer, comment_id: string, page_token?: string, include_deleted?: boolean }
- `POST https://api.mcp.ai/api/googledrive/list/revisions` — Tool to list a file's revision metadata (not content) in Google Drive. Drive may prune old revisions, so history may be incomplete for frequently edited files. Filter client-side for specific revision
  - body: { fileId: string, pageSize?: integer, pageToken?: string, supportsAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/list/shared/drives` — Tool to list the user's shared drives. Use when you need to get a list of all shared drives accessible to the authenticated user. Results may differ from the web UI due to admin policies; listing a dr
  - body: { q?: string, pageSize?: integer, pageToken?: string, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/modify/file/labels` — Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified. Use when you need to programmatically change labels on a Google Drive file, such as adding, upda
  - body: { kind?: string, file_id: string, label_modifications: object[] }
- `POST https://api.mcp.ai/api/googledrive/move/file` — Tool to move a file from one folder to another in Google Drive. To truly move (not just copy the parent), always provide both `add_parents` (destination folder ID) and `remove_parents` (source folder 
  - body: { file_id: string, add_parents?: string, ocr_language?: string, include_labels?: string, remove_parents?: string, supports_all_drives?: boolean, keep_revision_forever?: boolean, include_permissions_for_view?: string, use_content_as_indexable_text?: boolean }
- `POST https://api.mcp.ai/api/googledrive/parse/file` — DEPRECATED: Exports Google Workspace files (max 10MB) to a specified format using `mime_type`, or downloads other file types; use `GOOGLEDRIVE_DOWNLOAD_FILE` instead.
  - body: { file_id: string, mime_type?: string }
- `POST https://api.mcp.ai/api/googledrive/stop/watch/channel` — Tool to stop watching resources through a specified channel. Use this when you want to stop receiving notifications for a previously established watch. Both `id` and `resourceId` must be saved from th
  - body: { id: string, kind?: string, token?: string, params?: object, address?: string, payload?: boolean, expiration?: string, resourceId: string, channelType?: string, resourceUri?: string }
- `POST https://api.mcp.ai/api/googledrive/unhide/drive` — Tool to unhide a shared drive. Use when you need to restore a shared drive to the default view.
  - body: { driveId: string }
- `POST https://api.mcp.ai/api/googledrive/untrash/file` — Tool to restore a file from the trash. Use when you need to recover a deleted file. This action updates the file's metadata to set the 'trashed' property to false. Only works while the file remains in
  - body: { file_id: string, supportsAllDrives?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/comment` — Tool to update an existing comment on a Google Drive file. Use when you need to change the content of a comment. NOTE: The 'resolved' field is read-only in the Google Drive API. To resolve or reopen a
  - body: { fields?: string, content?: string, file_id: string, resolved?: boolean, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/update/drive` — Tool to update the metadata for a shared drive. Use when you need to modify properties like the name, theme, background image, or restrictions of a shared drive.
  - body: { name?: string, hidden?: boolean, driveId: string, themeId?: string, colorRgb?: string, restrictions?: object, backgroundImageFile?: object, useDomainAdminAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/file/put` — Updates file metadata. Uses PATCH semantics (partial update) as per Google Drive API v3 — only explicitly provided fields are updated, so omit fields you do not intend to overwrite. Use this tool to m
  - body: { name?: string, fileId: string, starred?: boolean, mime_type?: string, add_parents?: string, description?: string, ocr_language?: string, remove_parents?: string, writers_can_share?: boolean, supports_all_drives?: boolean, keep_revision_forever?: boolean, use_domain_admin_access?: boolean, viewers_can_copy_content?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/file/revision/metadata` — Updates ONLY the metadata properties of a specific file revision (keepForever, published, publishAuto, publishedOutsideDomain). IMPORTANT: This action does NOT update file content. To update file cont
  - body: { file_id: string, published?: boolean, keepForever?: boolean, publishAuto?: boolean, revision_id: string, publishedOutsideDomain?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/permission` — Tool to update a permission with patch semantics. Use when you need to modify an existing permission for a file or shared drive. Inherited or domain-managed permissions may not be editable; verify edi
  - body: { fileId: string, permission: object, permissionId: string, removeExpiration?: boolean, supportsAllDrives?: boolean, transferOwnership?: boolean, useDomainAdminAccess?: boolean, enforceExpansiveAccess?: boolean }
- `POST https://api.mcp.ai/api/googledrive/update/reply` — Tool to update a reply to a comment on a Google Drive file. Use when you need to modify the content of an existing reply.
  - body: { fields?: string, content: string, file_id: string, reply_id: string, comment_id: string }
- `POST https://api.mcp.ai/api/googledrive/upload/file` — Uploads a file (max 5MB) to Google Drive, placing it in the specified folder or root if no valid folder ID is provided. Always creates a new file (never updates existing); use GOOGLEDRIVE_EDIT_FILE to
  - body: { file_to_upload: object, folder_to_upload_to?: string }
- `POST https://api.mcp.ai/api/googledrive/watch/changes` — Tool to subscribe to changes for a user or shared drive in Google Drive. Use when you need to monitor a Google Drive for modifications and receive notifications at a specified webhook URL. Notificatio
  - body: { id: string, type: string, token?: string, params?: object, spaces?: string, address: string, drive_id?: string, page_size?: integer, expiration?: integer, page_token?: string, include_labels?: string, include_removed?: boolean, supports_all_drives?: boolean, restrict_to_my_drive?: boolean, include_corpus_removals?: boolean, include_permissions_for_view?: string, include_items_from_all_drives?: boolean }

## More
- Page: https://new.mcp.ai/googledrive
- Agent spec (llms.txt): https://new.mcp.ai/googledrive/llms.txt
- Postman collection: https://new.mcp.ai/googledrive/postman.json
