Share a doc (person or link)
share_docGrants access to a Google Doc by sharing it with a person via email as reader, commenter, or writer, or by setting anyone-with-link permissions; use role none to disable link sharing.
Instructions
Grant access to a Google Doc. With email, share with that person as reader/commenter/writer (optionally sending a notification). Without email, set anyone-with-link access to that role, or role "none" to disable link sharing. (To revoke a specific person’s access, use unshare_doc.)
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": {
"path": "<path>"
},
"name": "share_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The doc: a Drive id or URL, or /folder/doc. A tab path names its doc. | |
| role | No | access level; default writer. "none" (link only) disables link sharing. | |
| No | person to share with; omit to set anyone-with-link access instead | ||
| notify | No | when sharing with a person, send a notification email (default true) | |
| account | No | Google account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account. |