save_attachments
Download Gmail message attachments to a local directory and return the written paths; filter by filename or attachment ID, and avoid overwriting existing files unless enabled.
Instructions
Download attachments from a message to a local directory and return the written paths. All regular attachments by default; narrow with filenameContains or attachmentId. Existing files are not overwritten unless overwrite is set (a numbered copy is written instead).
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": {
"messageId": "<messageId>",
"directory": "<directory>"
},
"name": "save_attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes | Directory to write into; created if missing. | |
| messageId | Yes | ||
| overwrite | No | ||
| attachmentId | No | Save exactly this attachment (from list_attachments). | |
| includeInline | No | Also save inline images (signature logos and the like). Default false. | |
| filenameContains | No | Case-insensitive substring filter on the filename. |