drive_save_attachment
Save a Gmail attachment straight into a Google Drive folder without local storage, and skip if the file already exists.
Instructions
Save a Gmail attachment straight into a Google Drive folder — the bytes go directly from Gmail to Drive, never through local disk and never back in the tool result. Refuses when a file with the target name already exists in that folder rather than overwriting it. Cannot delete anything, and cannot upload a local file: only an attachment already on a Gmail message.
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": {
"account": "<account>",
"messageId": "<messageId>",
"attachmentId": "<attachmentId>",
"folderId": "<folderId>"
},
"name": "drive_save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Drive file name. Defaults to the attachment's own (sanitised) filename. | |
| account | Yes | Configured Gmail account alias, e.g. work, personal, support. | |
| folderId | Yes | Destination Drive folder id. | |
| messageId | Yes | Gmail message id the attachment is on. | |
| attachmentId | Yes | Attachment id, from gmail_read_message. |