share_file
Shares a Google Drive file or folder with specified users, groups, domains, or anyone by applying permission roles and sending optional notification emails.
Instructions
Share any file or folder with one or more principals.
Permission entries share concurrently rather than one at a time. If the
caller supplied a progressToken, a notifications/progress update is sent
as each share finishes (#355).
Args: file_id: The Google Drive file or folder ID. permissions: List of permission entries. Each must have 'type' and 'role'. Additional fields depend on type: type='user' or 'group' — requires 'email_address' type='domain' — requires 'domain' type='anyone' — no extra fields
type values: 'user', 'group', 'domain', 'anyone'
role values: 'reader', 'commenter', 'writer'
Example:
[
{'type': 'user', 'email_address': 'alice@example.com', 'role': 'writer'},
{'type': 'domain', 'domain': 'example.com', 'role': 'reader'},
{'type': 'anyone', 'role': 'reader'},
]
send_notification: Send notification email to user/group recipients (default True).Returns: Dictionary with 'successes' and 'failures' lists.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_id": "<file_id>",
"permissions": "<permissions>"
},
"name": "share_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| permissions | Yes | ||
| send_notification | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||