Download an attachment
download_attachmentSave an email attachment to the server's directory and get its file path. Specify folder and filename when a message contains multiple attachments.
Instructions
Save an attachment into the server's attachment directory and return its path.
Writes are confined to EMAIL_ATTACHMENT_DIR, and the sender's filename is sanitised before use.
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": {
"uid": "<uid>"
},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | IMAP UID of the message. | |
| folder | No | Folder the message is in. | INBOX |
| filename | No | Which attachment to save. Required when the message has several. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the saved file. | |
| size | No | ||
| filename | Yes | ||
| content_type | No |