Download media from a message
download_mediaSave a media file (photo, video, document, or voice note) from a specified Telegram message to a local directory and return the file path.
Instructions
Save the photo, video, document or voice note attached to a message, and return the local path. The file is written to disk rather than returned inline, because a base64 image in a tool result is enormous and unreadable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Directory to save into. Defaults to the working directory. | |
| peer | Yes | The chat the message is in. | |
| message_id | Yes | Id of the message carrying the media. |