gmail_download_attachment
Save a Gmail attachment to a chosen local directory, or return its bytes or a link on managed installs. Identify it by the name from gmail_list_message_attachments; requires user approval.
Instructions
Download a Gmail attachment's content. Identify the attachment by the name returned from gmail_list_message_attachments. On a local install: saved to destination_dir, and the saved file path is returned -- destination_dir is required, there is no default, so choose deliberately: pass ~/Downloads (or another path the user asked for) when this attachment is a deliverable the user should find afterward, or your own working/scratch directory when you're only downloading it to read or process it yourself. On an organization-managed install: destination_dir is ignored (there is no local filesystem you and the human share) -- a small attachment's bytes come back directly in this tool's result so you can read or hand it to the human yourself; a larger one comes back as a one-time link the human opens in their own signed-in browser tab instead. Requires user approval.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | One sentence: why are you calling this tool right now? | |
| message_id | Yes | ||
| attachment_name | Yes | ||
| destination_dir | Yes | Local install only: where to save the attachment -- required, no default. On an organization-managed install it is ignored and nothing is saved to it; any value will do. Use ~/Downloads (or a path the user specified) if the user should find this file afterward; use your own working/scratch directory if it's only for you to read or process. |