Download Beeper attachments
download_attachmentSaves message attachments such as images, videos, audio, and documents to local files and returns their paths. Also batch-saves chat media by time range, skipping files already saved.
Instructions
Save a message attachment (video, image, audio, document) to a local file and return its path. By default it goes to a new file in the addon's download folder; writing elsewhere (outputPath) needs the user's confirmation. Identify it with url (an mxc:// or localmxc:// URL, or a beeper-mcp://attachments/... URI as returned by the official Beeper MCP), or with chatID + messageID (+ index when a message has several attachments).
Batch: with chatID + since (+ until) instead of a message, it saves every photo and video (or mediaTypes) of that chat in that period into one folder, oldest first, named by date and message ID, and returns one short line per file (time, sender, message ID → file name). At most maxFiles per call (default 30): nextSince gives where to continue. Files already in the folder are skipped, so a repeated call only fetches what is missing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | mxc://, localmxc:// or beeper-mcp://attachments/{chatID}/{messageID}/{index} | |
| index | No | Attachment index in the message (default 0) | |
| since | No | Batch: ISO time; download the chat's media sent from then on (inclusive) | |
| until | No | Batch: ISO time; only media sent before it. Default: now | |
| chatID | No | Chat ID (or local chat ID) of the message, or of the chat to download from (batch) | |
| maxFiles | No | Batch: at most this many files per call (default 30) | |
| messageID | No | ID of the message holding the attachment | |
| outputDir | No | Batch: folder to save into (confirm with the user first). Default: one folder per chat in /root/.cache/beeper-mcp-addon/downloads | |
| overwrite | No | Replace outputPath if it already exists (default false). Replaces the user's file: confirm first | |
| mediaTypes | No | Batch: which kinds (default ["image", "video"]; "file" = documents, audio…). Stickers are skipped | |
| outputPath | No | Where to save the file (confirm with the user first). Defaults to a new file in /root/.cache/beeper-mcp-addon/downloads |