google-drive

v1.0.2
com.mcparmory/google-drive Checked 2 days ago Published 7 months ago

Manage files, folders, permissions, and collaborative content in Google Drive

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_user_info Get User Info

Retrieves information about the authenticated user, their Drive, and system capabilities. Use the `fields` parameter to specify which user properties and Drive details to return.

ParameterTypeDescription
fieldsstringSelector specifying which fields to include in a partial response.

get_access_proposal Get Access Proposal

Retrieves a specific access proposal for a file by its ID. Use this to check the status and details of pending access requests.

ParameterTypeDescription
fileId *stringThe unique identifier of the file or item associated with the access proposal.
proposalId *stringThe unique identifier of the access proposal to retrieve.

list_access_proposals List Access Proposals

Retrieve pending access proposals for a file. Only users with approver permissions can list access proposals; other users will receive a 403 error.

ParameterTypeDescription
fileId *stringThe unique identifier of the file for which to list access proposals.
pageSizeintegerThe maximum number of access proposals to return per page. Defaults to a server-defined limit if not specified.
pageTokenstringA continuation token from a previous paginated response to retrieve the next set of results.

resolve_access_proposal Resolve Access Proposal

Approves or denies a pending access proposal for a file. The approver can specify allowed roles when accepting and optionally notify the requester of the decision.

ParameterTypeDescription
fileId *stringThe ID of the file associated with the access proposal.
proposalId *stringThe ID of the access proposal to resolve.
actionstringThe action to take on the access proposal: accept to grant access, deny to reject it, or unspecified for no action.
rolearrayThe roles to grant the requester when accepting the proposal. Required when action is ACCEPT. Specify as an array of role identifiers.
sendNotificationbooleanWhether to send an email notification to the requester when the proposal is accepted or denied.
viewstringThe view context for this proposal, if it belongs to a view. Only the published view is supported.

get_approval Get Approval

Retrieves a specific approval by its ID from a file. Use this to fetch details about an approval request or decision.

ParameterTypeDescription
approvalId *stringThe unique identifier of the approval to retrieve.
fileId *stringThe unique identifier of the file containing the approval.

list_approvals List Approvals

Retrieves a paginated list of approvals associated with a specific file. Use pagination parameters to control result size and navigate through multiple pages.

ParameterTypeDescription
fileId *stringThe unique identifier of the file for which to retrieve approvals.
pageSizeintegerThe maximum number of approvals to return per page. Defaults to 100 if not specified.
pageTokenstringA pagination token from a previous response's nextPageToken field to retrieve the next page of results.

get_change_start_page_token Get Change Start Page Token

Retrieves the starting page token for listing future changes in Google Drive. Use this token to begin monitoring changes that occur after the current moment.

list_changes List Changes

Retrieves a list of changes for a user's My Drive or shared drive, enabling tracking of file modifications, deletions, and access changes. Use page tokens to iterate through results.

ParameterTypeDescription
pageToken *stringPagination token from the previous response's nextPageToken field or from getStartPageToken to continue listing changes on the next page.
includeCorpusRemovalsbooleanInclude the file resource in results even when removed from the changes list, provided the file remains accessible to the user at request time.
includeItemsFromAllDrivesbooleanInclude changes from both My Drive and shared drives in the results.
includeLabelsstringComma-separated list of label IDs to include detailed label information in the response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response.
includeRemovedbooleanInclude change entries indicating items have been removed, such as through deletion or loss of access.
pageSizeintegerMaximum number of changes to return per page.
restrictToMyDrivebooleanRestrict results to changes within the My Drive hierarchy, excluding changes to application data or shared files not added to My Drive.

list_comments List Comments

Retrieves all comments on a file, with options to filter by modification time and include deleted comments. The `fields` parameter must be specified to define which comment fields to return.

ParameterTypeDescription
fileId *stringThe unique identifier of the file whose comments should be retrieved.
fieldsstringSelector specifying which fields to include in a partial response.
includeDeletedbooleanWhether to include deleted comments in the results. Deleted comments will not contain their original content.
pageSizeintegerThe maximum number of comments to return in a single page of results.
pageTokenstringA pagination token from a previous response's `nextPageToken` field to retrieve the next page of results.
startModifiedTimestringFilter results to only include comments modified on or after this timestamp, specified in RFC 3339 date-time format.

create_comment Create Comment

Creates a comment on a file in Google Drive. The `fields` parameter must be set to specify which fields to return in the response.

ParameterTypeDescription
fileId *stringThe unique identifier of the file on which to create the comment.
anchor_end_indexintegerThe end index of the anchor region in the document
anchor_start_indexintegerThe start index of the anchor region in the document
contentstringThe plain text content of the comment. HTML content will be generated from this plain text for display purposes.
fieldsstringSelector specifying which fields to include in a partial response.

get_comment Get Comment

Retrieves a specific comment from a file by its ID. Supports optional retrieval of deleted comments, which will have their original content removed.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment to retrieve.
fileId *stringThe unique identifier of the file containing the comment.
fieldsstringSelector specifying which fields to include in a partial response.
includeDeletedbooleanWhether to include deleted comments in the response. Deleted comments will be returned without their original content.

update_comment Update Comment

Updates an existing comment in a file using patch semantics, allowing you to modify the comment's content. The `fields` parameter must be set to specify which fields to return in the response.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment to update.
fileId *stringThe unique identifier of the file containing the comment to update.
anchor_end_indexintegerThe end index of the anchor region in the document
anchor_start_indexintegerThe start index of the anchor region in the document
contentstringThe plain text content to set for the comment. This field updates the comment's text content.
fieldsstringSelector specifying which fields to include in a partial response.

delete_comment Delete Comment

Deletes a comment from a file. The comment and all associated replies will be permanently removed.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment to delete.
fileId *stringThe unique identifier of the file containing the comment to delete.
fieldsstringSelector specifying which fields to include in a partial response.

list_shared_drives List Shared Drives

Retrieves a list of shared drives accessible to the user, with optional filtering by search query and pagination support. Domain administrators can retrieve all shared drives within their domain by setting useDomainAdminAccess to true.

ParameterTypeDescription
pageSizeintegerMaximum number of shared drives to return in a single page of results. Useful for controlling response size and implementing pagination.
pageTokenstringToken for retrieving the next page of results. Use the pageToken from the previous response to continue pagination.
qstringSearch query to filter shared drives by name, description, or other attributes. Supports combining multiple search terms for refined results.
useDomainAdminAccessbooleanWhen set to true, issues the request with domain administrator privileges to retrieve all shared drives within the administrator's domain, rather than only user-accessible drives.

create_shared_drive Create Shared Drive

Creates a new shared drive with specified configuration and access restrictions. Use a unique requestId to ensure idempotent creation and avoid duplicates.

ParameterTypeDescription
requestId *stringA unique identifier (such as a UUID) that ensures idempotent creation. If the same requestId is used in a repeated request, the operation will not create a duplicate shared drive; instead, it will ret…
adminManagedRestrictionsbooleanWhether administrative privileges are required to modify restrictions on this shared drive.
colorRgbstringThe color of the shared drive as an RGB hex string. Can only be set when themeId is not specified.
copyRequiresWriterPermissionbooleanWhether copying, printing, and downloading files inside this shared drive should be disabled for readers and commenters. When enabled, this overrides the same restriction setting for individual files…
domainUsersOnlybooleanWhether access to this shared drive and its contents is restricted to users of the domain that owns the drive. Other sharing policies outside this drive may override this restriction.
driveMembersOnlybooleanWhether access to items inside this shared drive is restricted exclusively to its members.
hiddenbooleanWhether the shared drive should be hidden from the default view in the user interface.
namestringThe display name of the shared drive.
sharingFoldersRequiresOrganizerPermissionbooleanWhether only users with the organizer role can share folders. If false, both organizer and file organizer roles can share folders.
themeIdstringThe ID of a predefined theme that sets the background image and color for the shared drive. Available themes can be retrieved from the drive.about.get endpoint. Cannot be used together with colorRgb o…

get_shared_drive Get Shared Drive

Retrieves metadata for a shared drive by its ID. Use domain administrator access to retrieve drives belonging to your organization's domain.

ParameterTypeDescription
driveId *stringThe unique identifier of the shared drive to retrieve.
useDomainAdminAccessbooleanIf true, issues the request with domain administrator privileges, allowing access to shared drives within your domain even if you're not a direct member.

update_shared_drive Update Shared Drive

Updates the metadata and settings for a shared drive, including name, appearance, visibility, and access restrictions. Requires the shared drive ID and appropriate permissions to modify the specified properties.

ParameterTypeDescription
driveId *stringThe unique identifier of the shared drive to update.
adminManagedRestrictionsbooleanIf true, only administrators of the shared drive can modify access restrictions and other administrative settings.
colorRgbstringThe color of the shared drive as a hexadecimal RGB value. Cannot be used together with themeId in the same request.
copyRequiresWriterPermissionbooleanIf true, disables copy, print, and download options for readers and commenters on all files within the shared drive. This restriction overrides file-level settings.
domainUsersOnlybooleanIf true, restricts access to the shared drive and all its contents to users belonging to the same domain as the shared drive. Other sharing policies may override this restriction.
driveMembersOnlybooleanIf true, restricts access to items within the shared drive to its members only, preventing external sharing.
hiddenbooleanIf true, hides the shared drive from the default view in Google Drive, though it remains accessible via direct links and search.
idstringThe ID of an image file stored in Google Drive to set as the shared drive's background image. The image must be accessible to the requester.
namestringThe display name of the shared drive. This is the name visible to all members.
sharingFoldersRequiresOrganizerPermissionbooleanIf true, only users with the organizer role can share folders within the shared drive. If false, both organizer and file organizer roles can share folders.
themeIdstringThe ID of a predefined theme to apply to the shared drive, which sets both the background image and color. Available themes can be retrieved from the drive.about.get endpoint. This is a write-only fie…
useDomainAdminAccessbooleanIf true, allows a domain administrator to update the shared drive even if they are not a member, provided they administer the domain to which the shared drive belongs.

delete_shared_drive Delete Shared Drive

Permanently deletes a shared drive for which the user is an organizer. The shared drive must not contain any untrashed items unless item deletion is explicitly enabled with domain admin access.

ParameterTypeDescription
driveId *stringThe unique identifier of the shared drive to delete.
allowItemDeletionbooleanWhether to automatically delete all items contained within the shared drive. This option requires domain admin access to be enabled and is only applicable when the requester has domain administrator p…
useDomainAdminAccessbooleanWhether to issue the request with domain administrator privileges. When enabled, the requester must be an administrator of the domain to which the shared drive belongs, granting access to perform admi…

hide_shared_drive Hide Shared Drive

Hides a shared drive from the default view, removing it from the user's primary shared drive list. The drive remains accessible but is no longer displayed in standard navigation.

ParameterTypeDescription
driveId *stringThe unique identifier of the shared drive to hide.

unhide_shared_drive Unhide Shared Drive

Restores a shared drive to the default view, making it visible in the shared drives list. Use this operation to unhide a shared drive that was previously hidden from view.

ParameterTypeDescription
driveId *stringThe unique identifier of the shared drive to restore to the default view.

copy_file Copy File

Creates a copy of a file with optional updates applied using patch semantics. The copied file inherits permissions from its parent folder unless otherwise specified.

ParameterTypeDescription
fileId *stringThe unique identifier of the file to copy.
appPropertiesobjectCustom key-value pairs private to the requesting application. Entries with null values are cleared during copy operations. Requires OAuth 2 authentication to retrieve; API keys cannot access private p…
contentRestrictionsarrayRestrictions applied to file content access. Only populated when content restrictions are in effect.
copyRequiresWriterPermissionbooleanWhether copying, printing, and downloading options are disabled for readers and commenters.
descriptionstringA brief description or summary of the file's contents.
folderColorRgbstringThe color for a folder or folder shortcut as an RGB hex string. Supported colors are published in the folderColorPalette field of the about resource; unsupported colors are replaced with the closest a…
ignoreDefaultVisibilitybooleanWhether to bypass the domain's default visibility settings for the copied file. When enabled, the file's visibility is not automatically set to domain-wide visibility, though parent folder permissions…
imagestringThe thumbnail image data encoded using URL-safe Base64 format.
includeLabelsstringA comma-separated list of label IDs to include in the labelInfo section of the response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response. Only the published view is currently supported.
indexableTextstringText content to be indexed for improved fullText search results. Limited to 128 KB and may contain HTML elements.
inheritedPermissionsDisabledbooleanWhether inherited permissions are disabled for this file. Inherited permissions are enabled by default.
keepRevisionForeverbooleanWhether to mark the new head revision to be kept forever. Only applicable to files with binary content. A maximum of 200 revisions per file can be kept permanently; delete pinned revisions if this lim…
mimeTypestringThe MIME type of the file. Google Drive automatically detects an appropriate MIME type from uploaded content if not provided. The value cannot be changed unless a new revision is uploaded. Files creat…
namestringThe display name of the file. Not necessarily unique within a folder. For immutable items like shared drive roots and system folders, the name is constant.
ocrLanguagestringA language hint for OCR processing during image import, specified as an ISO 639-1 language code.
parentsarrayThe ID of the parent folder containing the copied file. A file can have only one parent folder. If not specified, the file inherits the discoverable parent of the source file or is placed in the user'…
propertiesobjectCustom key-value pairs visible to all applications. Entries with null values are cleared during copy operations.
restrictedForReadersbooleanWhether download and copy operations are restricted for readers.
restrictedForWritersbooleanWhether download and copy operations are restricted for writers. When enabled, download is also restricted for readers.
starredbooleanWhether the file is marked as starred by the user.
targetIdstringThe ID of the file that this shortcut points to. Only applicable to shortcut creation requests.
thumbnailMimeTypestringThe MIME type of the thumbnail image.
trashedbooleanWhether the file is in the trash, either directly or through a trashed parent folder. Only the file owner can trash files; other users cannot view files in the owner's trash.
video_dimensionsstringVideo dimensions in WIDTHxHEIGHT format (e.g., '1920x1080')
writersCanSharebooleanWhether users with writer-only permission can modify the file's sharing permissions. Not applicable to files in shared drives.

list_files List Files

Retrieves a list of the user's files with support for searching, filtering, and sorting. By default, all files including trashed items are returned; use the trashed parameter to exclude deleted files.

ParameterTypeDescription
includeItemsFromAllDrivesbooleanWhether to include items from both My Drive and shared drives in the results.
includeLabelsstringA comma-separated list of label IDs to include detailed label information in the response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response.
orderBystringA comma-separated list of sort keys to order results. Each key sorts ascending by default; append 'desc' to reverse order. Valid keys include createdTime, folder, modifiedByMeTime, modifiedTime, name,…
pageSizeintegerThe maximum number of files to return per page. Partial or empty result pages may be returned before reaching the end of the file list.
pageTokenstringThe pagination token from a previous response's nextPageToken field to retrieve the next page of results.
qstringA search query to filter file results using supported search syntax for files and folders.

create_file Create File

Creates a new file in Google Drive with optional metadata, content restrictions, and organizational properties. Supports file uploads up to 5,120 GB with any valid MIME type, and allows creation of shortcuts to existing files.

ParameterTypeDescription
appPropertiesobjectCustom key-value pairs private to your application. Entries with null values are removed during updates. Requires OAuth 2 authentication to retrieve.
contentRestrictionsarrayContent access restrictions applied to the file. Only populated if restrictions exist.
copyRequiresWriterPermissionbooleanDisable copy, print, and download options for readers and commenters.
descriptionstringBrief description or summary of the file's contents.
folderColorRgbstringRGB hex color code for folder or folder shortcut appearance. Supported colors are available in the about resource's folderColorPalette; unsupported colors default to the closest available option.
ignoreDefaultVisibilitybooleanBypass the domain's default visibility settings for this file. When enabled, the file's visibility is not automatically set to domain-wide; permissions are still inherited from parent folders.
imagestringThumbnail image data encoded as URL-safe Base64.
imageMediaMetadataHeightstringHeight of the image in pixels.
imageMediaMetadataWidthstringWidth of the image in pixels.
includeLabelsstringComma-separated list of label IDs to include in the response's labelInfo section.
includePermissionsForViewstringInclude additional view permissions in the response. Currently only 'published' is supported.
indexableTextstringText content to index for improved full-text search results. Limited to 128 KB and may contain HTML elements.
inheritedPermissionsDisabledbooleanDisable inherited permissions for this file. By default, files inherit permissions from their parent folder.
keepRevisionForeverbooleanPreserve the current file revision indefinitely. Only applicable to files with binary content; limited to 200 pinned revisions per file.
mimeTypestringMIME type of the file. Google Drive automatically detects an appropriate type from uploaded content if not specified. Cannot be changed unless a new revision is uploaded. Google Docs MIME types trigge…
namestringDisplay name of the file. Not required to be unique within a folder. For immutable items like shared drive roots, this value is constant.
ocrLanguagestringLanguage hint for optical character recognition during image import, specified as an ISO 639-1 language code.
parentsarrayID of the parent folder containing the file. A file can have only one parent. If omitted during creation, the file is placed in the user's My Drive root folder.
propertiesobjectCustom key-value pairs visible to all applications. Entries with null values are removed during updates.
restrictedForReadersbooleanRestrict download and copy access for readers.
restrictedForWritersbooleanRestrict download and copy access for writers. When enabled, download is also restricted for readers.
starredbooleanMark the file as starred in the user's Drive.
targetIdstringID of the file this shortcut points to. Only applicable when creating shortcuts with MIME type 'application/vnd.google-apps.shortcut'.
thumbnailMimeTypestringMIME type of the thumbnail image.
trashedbooleanMove the file to trash. Only the file owner can trash files; other users cannot see trashed files in the owner's trash.
useContentAsIndexableTextbooleanUse the uploaded file content as searchable indexable text to improve full-text query results.
videoMediaMetadataHeightstringHeight of the video in pixels.
videoMediaMetadataWidthstringWidth of the video in pixels.
writersCanSharebooleanAllow users with writer permission to modify the file's sharing permissions. Not applicable to files in shared drives.

get_file Get File

Retrieve a file's metadata or content by ID. Use alt=media to download file contents, or use the export operation for Google Docs, Sheets, and Slides formats.

ParameterTypeDescription
fileId *stringThe unique identifier of the file to retrieve.
includeLabelsstringComma-separated list of label IDs to include in the labelInfo section of the response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response.

update_file Update File

Updates a file's metadata, content, or both using patch semantics. Only populate fields you want to modify; some fields like modifiedDate are updated automatically. Supports file uploads up to 5,120 GB.

ParameterTypeDescription
fileId *stringThe unique identifier of the file to update.
addParentsstringComma-separated list of parent folder IDs to add to the file.
appPropertiesobjectArbitrary key-value pairs private to the requesting app. Entries with null values are cleared. Requires OAuth 2 authentication; API keys cannot retrieve private properties.
contentRestrictionsarrayRestrictions for accessing the file's content. Only populated if restrictions exist.
copyRequiresWriterPermissionbooleanWhether copying, printing, or downloading should be disabled for readers and commenters.
descriptionstringA short description of the file's purpose or content.
folderColorRgbstringThe color for a folder or folder shortcut as an RGB hex string. Uses the closest supported color if an unsupported color is specified.
imagestringThumbnail data encoded with URL-safe Base64.
includeLabelsstringComma-separated list of label IDs to include in the labelInfo section of the response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response.
indexableTextstringText to be indexed for improved fullText search queries. Limited to 128 KB and may contain HTML elements.
inheritedPermissionsDisabledbooleanWhether inherited permissions are disabled for this file. Inherited permissions are enabled by default.
keepRevisionForeverbooleanWhether to set the keepForever field in the new head revision for binary files. Limited to 200 revisions per file; delete pinned revisions if limit is reached.
mimeTypestringThe MIME type of the file. Google Drive auto-detects if not provided. Cannot be changed unless a new revision is uploaded. Google Doc MIME types trigger content import if supported.
namestringThe name of the file. Not necessarily unique within a folder. Immutable for top-level shared drive folders, My Drive root, and Application Data folder.
ocrLanguagestringLanguage hint for OCR processing during image import, specified as an ISO 639-1 code.
parentsarrayThe ID of the parent folder containing the file. A file can have only one parent. Use addParents and removeParents parameters to modify the parents list in update requests.
propertiesobjectArbitrary key-value pairs visible to all apps. Entries with null values are cleared in update requests.
removeParentsstringComma-separated list of parent folder IDs to remove from the file.
restrictedForReadersbooleanWhether download and copy are restricted for readers.
restrictedForWritersbooleanWhether download and copy are restricted for writers. If true, download is also restricted for readers.
starredbooleanWhether the user has starred the file.
targetIdstringThe ID of the file that this shortcut points to. Can only be set during file creation.
thumbnailMimeTypestringThe MIME type of the thumbnail image.
trashedbooleanWhether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner can trash files; other users cannot see files in the owner's trash.
useContentAsIndexableTextbooleanWhether to use the uploaded content as indexable text for fullText search queries.
writersCanSharebooleanWhether users with writer permission can modify the file's permissions. Not populated for items in shared drives.

delete_file Delete File

Permanently deletes a file owned by the user without moving it to trash. If the file is a folder, all descendants owned by the user are also deleted. For shared drives, the user must be an organizer on the parent folder.

ParameterTypeDescription
fileId *stringThe unique identifier of the file to delete.

download_file Download File

Downloads the content of a file from Google Drive. Operations are valid for 24 hours from the time of creation.

ParameterTypeDescription
fileId *stringThe unique identifier of the file to download.
revisionIdstringThe specific revision of the file to download. Only applicable for blob files, Google Docs, and Google Sheets. Returns an error if the file type does not support revision-specific downloads.

empty_trash Empty Trash

Permanently deletes all of the user's trashed files. This action cannot be undone and will remove all items currently in the trash.

export_document Export Document

Exports a Google Workspace document to a specified format and returns the exported content as bytes. The exported content is limited to 10 MB.

ParameterTypeDescription
fileId *stringThe unique identifier of the file to export.
mimeType *stringThe MIME type format for the exported document. Refer to the supported export formats for Google Workspace documents to determine valid MIME types for your file type.

generate_file_ids Generate File Ids

Generates a batch of file IDs for use in subsequent file creation or copy operations. These pre-generated IDs enable efficient file management workflows in Google Drive or App Data Folder.

ParameterTypeDescription
countintegerThe number of file IDs to generate. Must be between 1 and 1000 IDs per request.
spacestringThe storage space where generated IDs can be used to create files. Defaults to 'drive' for standard Google Drive storage.

list_file_labels List File Labels

Retrieves all labels applied to a specific file. Supports pagination to handle large label sets across multiple pages.

ParameterTypeDescription
fileId *stringThe unique identifier of the file whose labels you want to retrieve.
maxResultsintegerThe maximum number of labels to return in a single page of results. Defaults to 100 if not specified.
pageTokenstringA pagination token from a previous response's nextPageToken field to retrieve the next page of results.

update_file_labels Update File Labels

Updates the labels applied to a file by adding, modifying, or removing label fields. Returns the list of labels that were successfully added or modified.

ParameterTypeDescription
fileId *stringThe unique identifier of the file whose labels should be modified.
labelModificationsarrayAn ordered list of label modifications to apply to the file. Each modification specifies a label field and the values to set, add, or remove.

list_file_permissions List File Permissions

Retrieves all permissions for a file or shared drive, including access levels and sharing settings. Supports pagination and optional filtering for published views.

ParameterTypeDescription
fileId *stringThe unique identifier of the file or shared drive whose permissions you want to retrieve.
fieldsstringSelector specifying which fields to include in a partial response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response. Use 'published' to include permissions for the published view of the file.
pageSizeintegerThe maximum number of permissions to return per page. For shared drive files, defaults to 100 if not specified; for other files, returns the entire list.
pageTokenstringThe pagination token from a previous response's nextPageToken field. Use this to retrieve the next page of results.
useDomainAdminAccessbooleanWhen set to true, issues the request with domain administrator privileges. Only applicable when the fileId refers to a shared drive and the requester is a domain administrator.

create_file_permission Create File Permission

Grants access to a file or shared drive by creating a new permission. Supports sharing with users, groups, domains, or the public, with optional ownership transfer and notification settings.

ParameterTypeDescription
fileId *stringThe ID of the file or shared drive to which the permission applies.
allowFileDiscoverybooleanWhether the permission allows the file to be discovered through search results. Only applies to permissions with type domain or anyone.
domainstringThe domain name to which this permission applies. Used when granting access to an entire domain.
emailAddressstringThe email address of the user or group receiving this permission.
emailMessagestringCustom message text to include in the sharing notification email sent to recipients.
expirationTimestringThe date and time when this permission automatically expires. Must be a future date no more than one year away. Only applicable to user and group permissions.
inheritedPermissionsDisabledbooleanWhen set to true, only organizers, owners, and users with direct permissions can access the item. Inherited permissions from parent folders are disabled.
moveToNewOwnersRootbooleanWhen transferring ownership of a file outside a shared drive, set to true to move the file to the new owner's root folder and remove all previous parent folders. Set to false to preserve the folder hi…
rolestringThe access level granted by this permission. Common roles include owner, organizer, fileOrganizer, writer, commenter, and reader.
sendNotificationEmailbooleanWhether to send a notification email to the recipient. Defaults to true for users and groups. Cannot be disabled for ownership transfers.
transferOwnershipbooleanWhether to transfer file ownership to the specified user and downgrade the current owner to a writer role. Required as an acknowledgment of the ownership change side effects.
typestringThe type of the grantee. Supported values include: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user…
useDomainAdminAccessbooleanWhen set to true, issue the request as a domain administrator. Only applicable when the file ID refers to a shared drive and the requester is a domain administrator.
viewstringThe view scope for this permission. Published indicates a publishedReader role; metadata indicates the item is visible only in the metadata view with limited access. Metadata view is only supported on…

get_permission Get Permission

Retrieves a specific permission for a file by its ID. Use this to inspect sharing settings and access details for a particular file permission.

ParameterTypeDescription
fileId *stringThe unique identifier of the file for which you want to retrieve the permission.
permissionId *stringThe unique identifier of the permission to retrieve.
fieldsstringSelector specifying which fields to include in a partial response.
useDomainAdminAccessbooleanIf true, issues the request as a domain administrator, granting access when the file is a shared drive and the requester is an administrator of that shared drive's domain.

update_file_permission Update File Permission

Updates a file or shared drive permission using patch semantics. Supports modifying role, expiration, ownership transfer, and access settings. Note: Concurrent operations on the same file are not supported; only the last update applies.

ParameterTypeDescription
fileId *stringThe ID of the file or shared drive containing the permission to update.
permissionId *stringThe ID of the permission to update.
allowFileDiscoverybooleanWhether this permission allows the file to be discovered through search. Only applicable for permissions of type 'domain' or 'anyone'.
domainstringThe domain to which this permission applies.
emailAddressstringThe email address of the user or group to which this permission applies.
expirationTimestringThe expiration date and time for this permission in RFC 3339 format. Can only be set on user and group permissions, must be in the future, and cannot exceed one year from now.
fieldsstringSelector specifying which fields to include in a partial response.
inheritedPermissionsDisabledbooleanWhen true, restricts access to only organizers, owners, and users with permissions added directly on the item. Inherited permissions are disabled.
removeExpirationbooleanWhether to remove the expiration date from this permission.
rolestringThe role granted by this permission. Valid roles include: owner, organizer, fileOrganizer, writer, commenter, and reader.
transferOwnershipbooleanWhether to transfer ownership of the file to the specified user and downgrade the current owner to a writer role. This parameter must be explicitly set to acknowledge the ownership change side effect.
useDomainAdminAccessbooleanWhether to issue this request as a domain administrator. Only applicable when the file ID refers to a shared drive and the requester is an administrator of that domain.
viewstringThe view scope for this permission. Supported values are 'published' (permission role is publishedReader) and 'metadata' (item visible only to metadata view with limited access). The metadata view is…

delete_permission Delete Permission

Removes a specific permission from a file or shared drive. Note that concurrent permission operations on the same file are not supported; only the last update will be applied.

ParameterTypeDescription
fileId *stringThe unique identifier of the file or shared drive from which the permission will be removed.
permissionId *stringThe unique identifier of the permission to be deleted.
fieldsstringSelector specifying which fields to include in a partial response.
useDomainAdminAccessbooleanWhen set to true, issues the request with domain administrator privileges. Requires the file to be a shared drive and the requester to be a domain administrator of the domain owning that shared drive.

list_replies List Replies

Retrieves all replies to a specific comment on a file. Supports pagination and optional inclusion of deleted replies.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment whose replies should be listed.
fileId *stringThe unique identifier of the file containing the comment.
fieldsstringSelector specifying which fields to include in a partial response.
includeDeletedbooleanWhether to include deleted replies in the results. Deleted replies will not contain their original content.
pageSizeintegerMaximum number of replies to return in a single page of results.
pageTokenstringPagination token from the previous response's nextPageToken field to retrieve the next page of results.

create_comment_reply Create Comment Reply

Creates a reply to an existing comment on a file. Replies can either add content or perform actions like resolving or reopening the parent comment.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment to which the reply is being added.
fileId *stringThe unique identifier of the file containing the comment.
actionstringThe action to perform on the parent comment. Use this to resolve or reopen a comment instead of adding reply content.
contentstringThe plain text content of the reply. Required if no action is specified. The content will be displayed as plain text in the API response.
fieldsstringSelector specifying which fields to include in a partial response.

get_reply Get Reply

Retrieves a specific reply to a comment on a file. Optionally includes deleted replies, which are returned without their original content.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment that contains the reply.
fileId *stringThe unique identifier of the file containing the comment and reply.
replyId *stringThe unique identifier of the reply to retrieve.
fieldsstringSelector specifying which fields to include in a partial response.
includeDeletedbooleanWhether to include deleted replies in the response. Deleted replies are returned without their original content.

update_reply Update Reply

Updates a reply on a comment in a file using patch semantics. Supports modifying reply content or changing the reply's action status (resolve/reopen) relative to the parent comment.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment that contains the reply being updated.
fileId *stringThe unique identifier of the file containing the comment and reply.
replyId *stringThe unique identifier of the reply to update.
actionstringThe action this reply performs on the parent comment. Use to resolve or reopen a comment thread.
contentstringThe plain text content of the reply. Required if no action is specified. Note: use htmlContent for display purposes.
fieldsstringSelector specifying which fields to include in a partial response.

delete_reply Delete Reply

Deletes a reply from a comment on a file. This operation permanently removes the specified reply and cannot be undone.

ParameterTypeDescription
commentId *stringThe unique identifier of the comment containing the reply to delete.
fileId *stringThe unique identifier of the file containing the comment with the reply to delete.
replyId *stringThe unique identifier of the reply to delete.
fieldsstringSelector specifying which fields to include in a partial response.

get_file_revision Get File Revision

Retrieves a specific file revision's metadata or content by its ID. Use this to access historical versions of a file for review, recovery, or comparison purposes.

ParameterTypeDescription
fileId *stringThe unique identifier of the file containing the revision.
revisionId *stringThe unique identifier of the specific revision to retrieve.

update_file_revision Update File Revision

Updates a file revision's metadata using patch semantics, allowing you to preserve revisions indefinitely or configure auto-republishing behavior for Docs Editors files.

ParameterTypeDescription
fileId *stringThe unique identifier of the file containing the revision to update.
revisionId *stringThe unique identifier of the revision to update.
keepForeverbooleanWhether to permanently retain this revision in the file's history. When enabled, the revision will not be automatically deleted after 30 days. Limited to a maximum of 200 retained revisions per file.…
publishAutobooleanWhether to automatically republish subsequent revisions of this file. Only applicable to Google Docs, Sheets, and Slides files.

delete_file_revision Delete File Revision

Permanently deletes a specific version of a file. Only binary files (images, videos, etc.) support revision deletion; revisions for Google Docs, Sheets, and the last remaining file version cannot be deleted.

ParameterTypeDescription
fileId *stringThe unique identifier of the file containing the revision to delete.
revisionId *stringThe unique identifier of the specific file revision to permanently delete.

list_file_revisions List File Revisions

Retrieves a list of revisions for a specified file. Note that the revision history may be incomplete for files with extensive revision histories, and older revisions might be omitted from the response.

ParameterTypeDescription
fileId *stringThe unique identifier of the file whose revisions you want to list.
pageSizeintegerThe maximum number of revisions to return in a single page of results.
pageTokenstringA pagination token from a previous response to retrieve the next page of results. Use the 'nextPageToken' value returned from the prior request.