Download media from a message
download_mediaSaves a Telegram message's photo, video, document, or voice note to disk and returns the local path, avoiding huge inline base64 tool results.
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. |