Skip to main content
Returns a short-lived HTTPS download URL for a single attachment, identified by the message id plus the blobId listed by search_emails, get_thread, or get_email. The tool result is ~100 tokens of metadata and a URL — never the file content; the agent saves the file out-of-band, e.g. with curl -o.

Parameters

string
required
The id of the message the attachment belongs to, as returned by search_emails or get_thread.
string
required
The attachment’s blobId, as listed by search_emails, get_thread, or get_email for that message.

Example

Call
Result

How the URL works

  • The URL is a single-blob capability: an unguessable 256-bit token bound server-side to the granting user’s session and exactly one attachment. No bearer token is needed (or accepted) to fetch it — the token is the credential, like a presigned URL.
  • It expires after 24 hours and is reusable within that window (retries are fine). After expiry — or a server restart, or once the session’s access token lapses — the URL returns a 404/error; call the tool again for a fresh one.
  • GET on the URL streams the file with its correct Content-Type and a Content-Disposition filename; there is no size cap.
  • The filename and media type in the result come from the message itself, not from client input.

Errors

  • Email not found: <emailId> — no message with that id in the caller’s mailbox.
  • No attachment with blobId <blobId> on message <emailId>. — the blob isn’t an attachment of that message.