> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Google Drive

**Authentication:** OAuth. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Find files shared with `external@partner.com` in the last 7 days for a security review.
* Move every file in `My Drive / Receipts` older than 1 year into the `Archive 2024` folder.
* List documents in the `Engineering` shared drive last modified in the past week.

## Available Tools

#### list\_comments

List all comments and replies on a Google Drive file with pagination support

#### get\_comment

Get details of a specific comment

#### create\_comment

Add a new comment to a Google Drive file with optional text anchoring and rich formatting

#### update\_comment

Update the content of an existing comment on a Google Drive file

#### delete\_comment

Permanently delete a comment and all its replies from a Google Drive file

#### resolve\_comment

Mark a suggestion comment as resolved - ONLY works for suggestion comments (not regular comments) in Google Docs/Sheets/Slides

#### list\_replies

List all replies to a specific comment with pagination and filtering options

#### create\_reply

Add a reply to an existing comment thread on a Google Drive file

#### update\_reply

Update an existing reply to a comment

#### delete\_reply

Permanently delete a specific reply from a comment thread

#### list\_drives

List all shared drives (Team Drives) accessible to the user

#### get\_drive

Get detailed information about a specific shared drive

#### create\_drive

Create a new shared drive for team collaboration

#### update\_drive

Update shared drive settings including name, color, and restrictions

#### delete\_drive

Permanently delete a shared drive and all its contents

#### hide\_drive

Hide a shared drive from the user's view (does not delete)

#### unhide\_drive

Restore a hidden shared drive to the user's view

#### search\_drives

Search for shared drives by name or other criteria

#### set\_drive\_restrictions

Configure access restrictions for a shared drive

#### list\_files

List and search files and folders in Google Drive with advanced filtering options

#### get\_file

Get detailed metadata for a specific file or folder

#### create\_file

Create a new file or folder in Google Drive

#### update\_file

Update file or folder metadata including name, description, parents, and properties

#### copy\_file

Create a copy of a file with optional new name and location

#### delete\_file

Permanently delete a file or folder from Google Drive

#### trash\_file

Move a file or folder to the trash (can be restored later)

#### untrash\_file

Restore a file or folder from the trash

#### empty\_trash

Permanently delete all files in the trash

#### export\_file

Export a Google Workspace document to a specific format

#### generate\_file\_ids

Generate unique file IDs for batch operations

#### search\_files

Search for files using advanced Google Drive search queries

#### upload\_file

Upload a new file with content to Google Drive including Google Docs, Sheets, and other document types

#### update\_file\_content

Update the content of an existing file in Google Drive including Google Docs, Sheets, and other documents

#### list\_permissions

List all permissions (sharing settings) for a file or folder

#### get\_permission

Get details of a specific permission for a file

#### create\_permission

Share a file or folder with a user, group, or make it public

#### update\_permission

Update an existing permission (change access level or expiration)

#### delete\_permission

Remove a permission (stop sharing with a user or group)

#### batch\_create\_permissions

Share a file with multiple users/groups. Format: \[\{"type":"user","role":"reader","emailAddress":"[user@example.com](mailto:user@example.com)"}]

#### transfer\_ownership

Transfer ownership of a file to another user

#### batch\_delete\_permissions

Remove multiple permissions from a file at once

#### make\_public

Make a file or folder publicly accessible to anyone with the link

#### make\_private

Remove public access from a file or folder