Upload attachments
upload_attachmentsCreate short-lived upload URLs for local files, then use the returned blobId to attach PDFs, scans, or spreadsheets to email drafts without sending file bytes through the conversation.
Instructions
Get short-lived upload URLs for files on your own disk that should go out as email attachments, so their bytes never pass through the conversation. Use it for any local file — a PDF, a scan, a spreadsheet — instead of reading it as base64 into create_draft’s content; use blobId straight away instead when the file is already in the mailbox. The result is one URL and curl command per file: PUT the file to it (curl -sS -T '<file>' '<url>'), and the response is JSON with a blobId. Pass that blobId with the filename and mimeType the result lists in the attachments of create_draft or update_draft within 60 minutes. Up to 10 files per call; a file over 25 MB is named and skipped while the rest get URLs. Each URL takes one file and expires after 15 minutes. The URLs are credentials: never echo them to the user.
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": {
"files": "<files>"
},
"name": "upload_attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | The local files to upload, at most 10 per call. Each gets its own URL. |