Manage Attachments
attachmentsUpload, download, list, delete, and create one-time token URLs for secure sharing of binary attachments (images, PDFs, audio, video) referenced from event payloads.
Instructions
Binary attachments (images, PDFs, audio, video) referenced from event payloads / input_data via format: pane-attachment-id. ONE tool with an action enum: upload | download | show | list | delete | mint_token | revoke_token | list_tokens. upload reads an ABSOLUTE file_path; download writes to an ABSOLUTE out_path (or returns base64). Scope an upload to agent (default, reusable), pane, or template. mint_token returns a /b/ capability URL (ONCE) a browser can GET without your API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | upload: advisory Content-Type (the relay sniffs the bytes regardless). | |
| once | No | mint_token: token self-deletes on first GET. | |
| limit | No | list page size (1..100). | |
| scope | No | upload scope (default agent). | |
| action | Yes | Binary attachment operations. upload: read a local file (file_path) and upload it; scope agent|pane|template. download: fetch bytes by attachment_id to out_path (absolute) or return base64. show: metadata only. list: the agent's attachments. delete: soft-delete. mint_token: mint a /b/<token> capability URL (returned ONCE). revoke_token / list_tokens: manage those tokens. | |
| cursor | No | list pagination cursor. | |
| pane_id | No | Required when scope=pane. | |
| filename | No | upload: display filename (defaults to the file's basename). | |
| out_path | No | download: ABSOLUTE path to write the bytes to. If omitted, the bytes are returned base64-encoded in the result. | |
| token_id | No | revoke_token: the token id to revoke. | |
| file_path | No | upload: ABSOLUTE path to the local file to upload. | |
| template_id | No | Required when scope=template. | |
| ttl_seconds | No | mint_token: per-token TTL (clamped by scope default). | |
| attachment_id | No | Attachment id. Required for download/show/delete/mint_token/revoke_token/list_tokens. |