Search Documentation
Search across all documentation pages
download_media
Download and decrypt a media attachment by ID. Returns base64-encoded file content with metadata. Use this to retrieve a previously uploaded media file.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| attachmentId | string (UUID) | required | Media attachment ID to download |
Returns#
JSON object with base64-encoded file content, file name, MIME type, and metadata.
Example#
json
{
"tool": "download_media",
"arguments": {
"attachmentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Notes#
- Requires gateway mode (agent key). Not available in direct Supabase mode.
- The file is decrypted server-side using the agent's wrapped MEK.
- Large files (video, audio) may take longer to download due to base64 encoding overhead.