Google Drive
v1.3.0Allow AI systems to list, search, upload, download, and manage files and folders in Google Drive.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
files_list List files
List files in Google Drive. Use query parameter to filter results using Drive search syntax.
| Parameter | Type | Description |
|---|---|---|
fields | string | Fields to include in response. Defaults to common fields. |
includeItemsFromAllDrives | boolean | Include files from shared drives |
orderBy | string | Sort order (e.g., "modifiedTime desc", "name") |
pageSize | number | Maximum number of files to return (1-1000) |
pageToken | string | Token for pagination |
q | string | Search query using Drive search syntax (e.g., "name contains 'report'" or "mimeType='application/pdf'") |
spaces | string | Spaces to search |
supportsAllDrives | boolean | Support shared drives |
file_get Get file metadata
Get metadata for a specific file by ID. Use file_download to get the file content.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file to retrieve |
fields | string | Fields to include in response. Defaults to all common fields. |
supportsAllDrives | boolean | Support shared drives |
file_download Download file content
Download the content of a file. Text files are returned as plain text; binary files (images, PDFs, etc.) are returned base64-encoded with isBase64: true. For Google Docs/Sheets/Slides, use exportMimeType to specify the format (e.g., "text/plain" for Docs, "text/csv" for Sheets).
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file to download |
exportMimeType | string | For Google Docs/Sheets/Slides, the MIME type to export as (e.g., "text/plain", "application/pdf", "text/csv") |
file_upload Upload file
Upload a new file to Google Drive.
| Parameter | Type | Description |
|---|---|---|
content * | string | The content of the file. For binary files (images, PDFs, etc.), provide base64-encoded content. |
mimeType * | string | The MIME type of the file (e.g., "text/plain", "image/jpeg", "application/pdf") |
name * | string | The name of the file |
description | string | Description of the file |
isBase64 | boolean | Set to true if content is base64-encoded (required for binary files like images) |
parents | array | Parent folder IDs. If not specified, file is created in root. |
file_update Update file
Update a file's content or metadata. Provide content to update file content, or just metadata fields to update metadata only.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file to update |
content | string | New content for the file |
description | string | New description for the file |
mimeType | string | MIME type of the content (required if content is provided) |
name | string | New name for the file |
starred | boolean | Star or unstar the file |
supportsAllDrives | boolean | Support shared drives |
trashed | boolean | Move to trash (true) or restore from trash (false). Trashed files can be restored within 30 days. |
file_copy Copy file
Create a copy of a file.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file to copy |
name | string | Name for the copy. If not specified, uses "Copy of [original name]" |
parents | array | Parent folder IDs for the copy |
supportsAllDrives | boolean | Support shared drives |
file_move Move file
Move a file to a different folder by changing its parents.
| Parameter | Type | Description |
|---|---|---|
addParents * | array | Folder IDs to add as parents (where to move the file) |
fileId * | string | The ID of the file to move |
removeParents | array | Folder IDs to remove as parents (current locations) |
supportsAllDrives | boolean | Support shared drives |
file_delete Delete file permanently
Permanently delete a file. This cannot be undone. In almost all cases, you should use file_update with trashed:true instead, which moves the file to trash where it can be restored within 30 days.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file to permanently delete |
supportsAllDrives | boolean | Support shared drives |
folder_create Create folder
Create a new folder in Google Drive.
| Parameter | Type | Description |
|---|---|---|
name * | string | The name of the folder |
description | string | Description of the folder |
parents | array | Parent folder IDs. If not specified, folder is created in root. |
comments_list List comments
List comments on a file. Works with Google Docs, Sheets, Slides, and other Drive files.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file |
includeDeleted | boolean | Include deleted comments |
pageSize | number | Maximum number of comments to return (1-100) |
pageToken | string | Token for pagination |
startModifiedTime | string | Only return comments modified after this time (RFC 3339) |
comment_get Get comment
Get a specific comment and its replies.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment |
fileId * | string | The ID of the file |
includeDeleted | boolean | Include deleted replies |
comment_create Create comment
Add a comment to a file. For images: supports anchored comments using the anchor parameter with format [null,[null,[x,y,width,height]],null,null] where coordinates are fractions 0-1. For Google Docs/Sheets/Slides: only unanchored comments work (appear in sidebar). Anchored comments cannot be created via API due to proprietary formats. See: https://issuetracker.google.com/issues/36763384. However, you can use comment_reply to reply to existing anchored comments.
| Parameter | Type | Description |
|---|---|---|
content * | string | The text content of the comment |
fileId * | string | The ID of the file to comment on |
anchor | string | JSON anchor for positioned comments on images. Format: [null,[null,[x,y,width,height]],null,null] where x,y,width,height are fractions 0-1. Example: [null,[null,[0.1,0.1,0.3,0.3]],null,null] for top-l… |
comment_reply Reply to comment
Add a reply to an existing comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment to reply to |
content * | string | The text content of the reply |
fileId * | string | The ID of the file |
comment_resolve Resolve or reopen comment
Resolve or reopen a comment by posting a reply with the specified action.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment to resolve or reopen |
fileId * | string | The ID of the file |
action | string | Action to perform: "resolve" to mark as resolved, "reopen" to unresolve |
content | string | Optional message to include with the action |
replies_list List replies
List replies to a comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment |
fileId * | string | The ID of the file |
includeDeleted | boolean | Include deleted replies |
pageSize | number | Maximum number of replies to return (1-100) |
pageToken | string | Token for pagination |
reply_get Get reply
Get a specific reply to a comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment |
fileId * | string | The ID of the file |
replyId * | string | The ID of the reply |
includeDeleted | boolean | Return the reply even if deleted |
reply_update Update reply
Update the content of an existing reply.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment |
content * | string | The updated text content of the reply |
fileId * | string | The ID of the file |
replyId * | string | The ID of the reply to update |
reply_delete Delete reply
Delete a reply from a comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The ID of the comment |
fileId * | string | The ID of the file |
replyId * | string | The ID of the reply to delete |
permissions_list List permissions
List all permissions on a file or shared drive. Shows who has access and their role.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive |
pageSize | number | Maximum number of permissions to return (1-100) |
pageToken | string | Token for pagination |
supportsAllDrives | boolean | Support shared drives |
useDomainAdminAccess | boolean | Issue the request as a domain administrator |
permission_get Get permission
Get a specific permission by ID on a file or shared drive.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive |
permissionId * | string | The ID of the permission |
supportsAllDrives | boolean | Support shared drives |
useDomainAdminAccess | boolean | Issue the request as a domain administrator |
permission_create Create permission
Share a file or shared drive by creating a new permission. Grants access to a user, group, domain, or anyone.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive |
role * | string | The role granted by this permission |
type * | string | The type of grantee: user, group, domain, or anyone |
domain | string | Domain (required for type domain, e.g. "example.com") |
emailAddress | string | Email address of user or group (required for type user/group) |
emailMessage | string | Custom message to include in the notification email |
moveToNewOwnersRoot | boolean | Move the file to the new owner's My Drive root folder (only for transferOwnership) |
sendNotificationEmail | boolean | Send a notification email when sharing |
supportsAllDrives | boolean | Support shared drives |
transferOwnership | boolean | Whether to transfer ownership to the specified user (role must be owner) |
useDomainAdminAccess | boolean | Issue the request as a domain administrator |
permission_update Update permission
Update an existing permission on a file or shared drive. Can change role or expiration.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive |
permissionId * | string | The ID of the permission to update |
role * | string | The new role for the permission |
expirationTime | string | Expiration time in RFC 3339 format. Setting to null removes expiration. |
removeExpiration | boolean | Remove the expiration time |
supportsAllDrives | boolean | Support shared drives |
transferOwnership | boolean | Whether to transfer ownership (role must be owner) |
useDomainAdminAccess | boolean | Issue the request as a domain administrator |
permission_delete Delete permission
Remove a permission from a file or shared drive, revoking access for that user/group/domain.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive |
permissionId * | string | The ID of the permission to delete |
supportsAllDrives | boolean | Support shared drives |
useDomainAdminAccess | boolean | Issue the request as a domain administrator |