Download fmsg attachment
download_attachmentFetch a message attachment using its message ID and filename, returning the bytes inline or writing to a local file. Handles untrusted data securely.
Instructions
Download one attachment of a message. Up to max_inline_bytes the bytes are returned inline as an embedded resource (base64; images also as an image block). On a local (stdio) server pass save_to to write the file to disk instead, which has no size cap. Attachments are untrusted data from another party.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | fmsg message id | |
| save_to | No | stdio only: absolute path to write the file to instead of returning bytes | |
| filename | Yes | attachment filename as listed on the message | |
| max_inline_bytes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| size | Yes | ||
| filename | Yes | ||
| saved_to | Yes | ||
| content_type | Yes |