set_drive_file_permissions
Control sharing settings for Google Drive files and folders, including link access levels and editor permissions, to manage file security and collaboration.
Instructions
Sets file-level sharing settings and controls link sharing for a Google Drive file or folder.
This is a high-level tool for the most common permission changes. Use this to toggle "anyone with the link" access or configure file-level sharing behavior. For managing individual user/group permissions, use share_drive_file or update_drive_permission instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address. Required. | |
| file_id | Yes | The ID of the file or folder. Required. | |
| link_sharing | No | Control "anyone with the link" access for the file. - "off": Disable "anyone with the link" access for this file. - "reader": Anyone with the link can view. - "commenter": Anyone with the link can comment. - "writer": Anyone with the link can edit. | |
| writers_can_share | No | Whether editors can change permissions and share. If False, only the owner can share. Defaults to None (no change). | |
| copy_requires_writer_permission | No | Whether viewers and commenters are prevented from copying, printing, or downloading. Defaults to None (no change). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |