Manage spreadsheet access
manage_permissionsList, grant, update, or revoke sharing permissions on a Google Sheet to control access by users, groups, domains, or public link.
Instructions
Shares the spreadsheet (Drive permissions on the file — the OAuth token needs a Drive scope; the spreadsheets scope alone gets 403 here while every Sheets tool still works). action=list shows who has access: id, type, role, emailAddress/domain per permission; one page per call (shared-drive files cap a page at 100) — when the reply carries nextPageToken, pass it back as page_token for the rest. action=grant gives role reader/commenter/writer to type user/group (email_address required), domain (domain required, e.g. "example.com") or anyone (makes the link public — use deliberately); send_notification_email (default true for users) and email_message control the notification, allow_file_discovery lets domain/anyone grants surface in search. action=update changes an existing permission's role (permission_id + role). action=revoke removes a permission (permission_id) — the person loses access immediately. Ownership transfer is not supported by this server. Protecting individual ranges from co-editors is manage_protected_ranges, not this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | grant/update: the access level to give. | |
| type | No | grant: who the grantee is. | |
| action | Yes | What to do with the file's permissions. | |
| domain | No | grant (domain): the domain, e.g. "example.com". | |
| page_size | No | list: max permissions per page (1..100; shared-drive files default to 100). | |
| page_token | No | list: nextPageToken from the previous page. | |
| email_address | No | grant (user/group): the grantee's email. | |
| email_message | No | grant: custom text for the notification email. | |
| permission_id | No | update/revoke: the permission's id from action=list (or the grant reply). | |
| spreadsheet_id | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. | |
| allow_file_discovery | No | grant (domain/anyone): let the file appear in search results (default false). | |
| send_notification_email | No | grant: send the standard sharing notification (default true for users/groups). |