Download Attachment
get_attachmentDownload an email or calendar attachment to disk and receive its local path. Specify the attachment ID, with optional custom filename and target directory.
Instructions
Download an attachment to disk and return its path.
Works for both mail and calendar attachments.
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": {
"attachment_id": "<attachment_id>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | override the server-supplied file name. | |
| target_dir | No | destination directory. Default /tmp/attachments (override with EXCHANGE_ATTACHMENT_DIR). | |
| attachment_id | Yes | attachment_id from get_email or get_event. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |