
List all comments and replies on a Google Drive file with pagination support
Get details of a specific comment
Add a new comment to a Google Drive file with optional text anchoring and rich formatting
Update the text content of an existing comment on a Google Drive file. Use listcomments to find comment IDs. Resolved state is not writable through this tool - use resolvecomment or reopen_comment to change whether a thread is resolved.
Permanently delete a comment and all its replies from a Google Drive file
Resolve a comment thread on a Google Drive file by posting a reply with action 'resolve' (the only way Drive can resolve a thread). Optionally attach text to that reply. Use listcomments to find comment IDs. Use reopencomment to undo, or delete_comment to remove a thread entirely.
Reopen a resolved comment thread on a Google Drive file by posting a reply with action 'reopen' (the only way Drive can reopen a thread). Optionally attach text to that reply. Use listcomments to find comment IDs. Use resolvecomment to resolve a thread again.
List all replies to a specific comment with pagination and filtering options
Get a single reply in a comment thread on a Google Drive file by its ID. Use listreplies to find reply IDs and listcomments to find comment IDs. Prefer list_replies to browse a whole thread; use this when you already have a reply ID.
Add a reply to an existing comment thread on a Google Drive file. Use listcomments to find comment IDs. Provide content, or an action ('resolve'/'reopen') to change the thread's state, or both. Prefer resolvecomment / reopen_comment when you only want to change resolution state.
Update an existing reply to a comment
Permanently delete a specific reply from a comment thread
List all shared drives (Team Drives) accessible to the user
Get detailed information about a specific shared drive
Create a new shared drive for team collaboration. Pass a stable requestid and reuse the SAME value on any retry: a repeat then fails with guidance to recover the already-created drive via searchdrives, instead of creating a duplicate. Only name and themeid are settable on create - use updatedrive afterwards for restrictions, colorrgb and backgroundimage_file.
Update shared drive settings including name, color, and restrictions
Permanently delete a shared drive. By default this only succeeds on an EMPTY drive: deleting a drive that still holds untrashed items requires allowitemdeletion=true together with usedomainadminaccess=true (the API only honours allowitemdeletion for domain admins). Cannot be undone. Use listdrives to find drive IDs.
Hide a shared drive from the user's view (does not delete)
Restore a hidden shared drive to the user's view
Search shared drives with a Drive query, e.g. "name contains 'marketing'". Use this when you have search criteria; use listdrives to browse everything. Results are paginated - pass nextpagetoken from the response back as pagetoken to fetch further matches.
Set access restrictions on a shared drive (all six Drive.restrictions fields). Omitted fields are left unchanged. Use listdrives or searchdrives to find drive IDs. Note download_restriction is an object, e.g. {'restrictedForReaders': true}, not a boolean.
List and search files and folders in Google Drive with advanced filtering options
Get detailed metadata for a specific file or folder. If mimeType is 'application/vnd.google-apps.shortcut', the file is a shortcut and its own metadata describes the link, not the content: read shortcutdetails.targetid and call get_file again with that ID to reach the destination file.
Create an empty file, folder, or shortcut in Google Drive; takes no content. To create a file with content, use uploadfile instead. Set mimetype to 'application/vnd.google-apps.folder' for a folder, or to 'application/vnd.google-apps.shortcut' with shortcuttargetid for a shortcut. Use listfiles to find parent folder IDs. To make creation retry-safe, pass an id from generatefile_ids.
Update file or folder metadata including name, description, parents, and properties
Create a copy of a file with an optional new name and location. Folders cannot be copied. Use listfiles to find the source file ID and parent folder IDs. To make the copy retry-safe, call generatefile_ids first and pass one of the returned IDs as id; a retry with the same id then returns the already-created copy.
PERMANENT — bypasses the trash and cannot be undone. Use trashfile for a recoverable delete. On a folder this also removes every descendant you own. Use listfiles or search_files to find file IDs.
Move a file or folder to the trash, from where it can be restored with untrashfile or purged with emptytrash. Use listfiles or searchfiles to find file IDs. To delete permanently and irreversibly instead, use delete_file.
Restore a file or folder from the trash. Use listfiles with the query "trashed=true" to find trashed file IDs. Files already purged by emptytrash or delete_file cannot be restored.
Permanently delete all files in the trash
Convert and export a Google Workspace document (Docs, Sheets, Slides, Drawings) to a chosen format such as PDF, DOCX, XLSX, or plain text. Exported content is limited to 10 MB; larger documents fail. Set returndownloadurl=true for a short-lived download URL instead of inline content. Use ONLY for native Workspace files; for stored files, use readfiletext or download_file.
Download the raw stored bytes of a regular (non-Workspace) file by file ID -- PDF, CSV, image, ZIP or Office. Returns text as a string and binary as base64. Set returndownloadurl=true for a short-lived download URL instead, which handles larger files. To READ a PDF, DOCX or XLSX, use readfiletext, which returns extracted text. For native Workspace documents, use export_file.
Read a Drive file's contents as text; the format is detected from the file ID. Native Docs/Sheets/Slides are exported (Sheets as CSV); stored PDF, DOCX and XLSX have text extracted server-side; text files are decoded. Prefer over downloadfile to READ content. Branch on extractionstatus: 'empty' means blank or image-only, do not retry or guess; 'unsupported' means no text, use download_file.
Pre-generate file IDs that can be passed as the id field to createfile or copyfile, making those writes retry-safe: a replay with the same ID returns the already-created file instead of creating a duplicate. Set type to 'shortcuts' for shortcut IDs, otherwise IDs are for files.
Search for files using an advanced Google Drive query string. Use listfiles instead for plain paginated browsing with no query. Pass the nextpagetoken from a previous response back as pagetoken to fetch the next page, and fields to narrow the returned columns.
Initiates a resumable upload and returns one-time usable pre-authorized session URI (valid 7 days) that the caller streams file chunks to via HTTP PUT with X-Goog-Upload-Offset, X-Goog-Upload-Command (upload/finalize), and X-Goog-Upload-Total-Size headers. Chunks must be 256KiB except the final one. Branch on the X-Goog-Upload-Status header (active/final), not the status code. See docstring.
Create a file with content in Google Drive (text, CSV, HTML, or base64), optionally converted to a Google Doc, Sheet, or Slides file via targetmimetype. Use this, not createfile, whenever the new file has content; createfile makes only empty files, folders, and shortcuts. For large files, pass a file_reference from POST /api/v1/files/; it streams in without entering the model's context.
Update the content of an existing file in Google Drive including Google Docs, Sheets, and other documents
List all permissions (sharing settings) for a file or folder
Get details of a specific permission for a file
Share a file or folder with a user, group, or make it public
Update an existing permission (change access level or expiration)
Remove a permission (stop sharing with a user or group)
Share a file with multiple users/groups. Format: [{"type":"user","role":"reader","emailAddress":"user@example.com"}]. Sends a notification email to each user/group grantee unless sendNotificationEmail is false. Cannot transfer ownership; use transfer_ownership for that.
Transfer ownership of a file to another user. The new owner must be a user, not a group; use listpermissions to check an existing grantee's type. Google always emails the new owner, so sendnotification_email cannot be false. On consumer accounts the transfer is pending until the recipient accepts.
Remove multiple permissions from a file at once
Make a file or folder accessible to anyone with the link. Grants role 'reader' by default; 'writer' lets anyone with the link edit. Note that later removing public access (make_private) does not retract a link that has already been distributed.
Remove public access from a file or folder
Validate Google Drive credentials. Verifies credentials during setup.

In an mcp.json file, add the configuration below, and restart Cursor.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5 "headers": {
6 "Authorization": "Bearer yMt*****"
7 }
8 }
9 }
10}
11Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.
Make sure Claude is using the Node v20+.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "yMt*****"
14 }
15 }
16 }
17}Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "<ah-production-access-key>"
14 }
15 }
16 }
17 }In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".
You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.
Learn more in the official documentation ↗
1{
2 "inputs": [
3 {
4 "type": "promptString",
5 "id": "agent-handler-auth",
6 "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7 "password": true
8 }
9 ],
10 "servers": {
11 "agent-handler": {
12 "type": "stdio",
13 "command": "npx",
14 "args": [
15 "-y",
16 "mcp-remote@latest",
17 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18 "--header",
19 "Authorization: Bearer ${input:agent-handler-auth}"
20 ]
21 }
22 }
23}Your top use cases hinge on the type of agents you support. That said, here are several common agentic use cases for Google Drive:
Here are several popular tools broken down by data types:
Merge Agent Handler adds enterprise-grade infrastructure and controls on top of MCP:
You can easily set a wide range of rules. Here are just a few examples:
Here are the steps you can take within the Connector Studio:
1. Start with Merge’s pre-built Google Drive connector. The connector provides dozens of out-of-the-box tools that are maintained by Merge.
2. If necessary, you can add new tools or modify existing Google Drive tools. Use Connector Studio to create custom tools for specialized workflows or to modify existing tools to change parameters, add validation logic, or adjust response formats to match your agent's needs.
3. Configure the authentication type (individual or shared). Choose individual auth when each user needs to connect their own Google Drive account, or shared auth when your agent should act on behalf of a single service account across all users.
4. Bundle tools into Tool Packs and associate them with your agent via the dashboard or API. Group related Google Drive tools into a Tool Pack (e.g., "Document Management" or "File Storage Core"), then attach that Tool Pack to your agent through the Agent Handler dashboard or programmatically via the API. This makes it easy to manage permissions and enable/disable entire sets of functionality at once.
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now