save_attachment
E-mail · macOS
Effect: schrijven. Status: voorwaardelijk beschikbaar.
‘Voorwaardelijke beschikbaarheid’ betekent dat het hulpmiddel kan afhangen van versie, platform, machtigingen, account of configuratie. Het is niet in elke installatie actief.
macOS
Doel
Slaat een bijlage uit een e-mail op schijf op. Vereist confirm=true; zonder dit krijg je een voorbeeld van de locatie waar het bestand zou worden geschreven. Geef account= door (en mailbox= als die bekend is, beide uit list_emails/search_emails), zodat de zoekopdracht één account gebruikt in plaats van ze allemaal te doorzoeken.
Vereiste invoer
message_idattachment_name
De namen blijven exact zoals het hulpmiddel ze vereist. De canonieke technische definities in het Engels staan in het uitklapbare schema hieronder.
Machtigingen en bevestiging
Het schema bevat een expliciete bevestigingsparameter. Controleer het voorbeeld en autoriseer de echte bewerking volgens het platformcontract.
- Gebruik uitsluitend de apps, accounts en bronnen waarvoor de gebruiker op dit platform toestemming heeft gegeven. Raadpleeg de platformspecifieke beschrijving van deze tool voor de verbindings- en toestemmingsvereisten; deze catalogus veronderstelt geen aanvullende OAuth-bereiken of OS-rechten.
Canoniek technisch schema in het Engels — macOS
{
"properties": {
"account": {
"description": "Mail.app account the message lives in (returned alongside the id). Passing it skips searching the other accounts.",
"type": "string"
},
"attachment_name": {
"description": "File name of the attachment as it appears in the message.",
"type": "string"
},
"confirm": {
"default": "false",
"description": "Set to true to actually write the file. Without it you get a preview of where it would be written. Defaults to false.",
"type": "boolean"
},
"destination": {
"default": "~/Downloads",
"description": "Folder to write the file into. Defaults to ~/Downloads.",
"type": "string"
},
"mailbox": {
"description": "Folder the message lives in (returned alongside the id). Passing it skips searching the other folders.",
"type": "string"
},
"message_id": {
"description": "The message id of the email that carries the attachment, from list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form.",
"type": "string"
}
},
"required": [
"message_id",
"attachment_name"
],
"type": "object"
}Documentatievoorbeeld
Documentatievoorbeeld voor save_attachment. Voer dit voorbeeld niet uit. De getoonde argumenten verwijzen naar fictieve gegevens; zoek vóór een echte aanroep de werkelijke identificatoren op en vraag toestemming.
{
"attachment_name": "launch-checklist.pdf",
"confirm": false,
"message_id": "demo-message-001"
}