Mail: Save attachment
mail_save_attachmentKeep ONE attachment of the caller's message in their personal Documents — 'save the invoice they sent'. The file is copied, not moved: the letter stays as it is. The usual document rules apply (allowed types: PDF, images, Office files, text/CSV; the storage quota). Text is extracted where the file has any. Returns document_id, which mail_send / mail_save_draft accept in attachments=[{document_id}]. The file is EXTERNAL content and is stored as such. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
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": {
"message_id": "<message_id>",
"part": "<part>"
},
"name": "mail_save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | Yes | The attachment's 'part' index from mail_get_message. | |
| message_id | Yes | The 'id' from mail_list_messages. |