tg_send_file
Sends a photo, voice message, video, or file to a Telegram chat from a server path, public URL, or base64 content, with optional caption and reply settings.
Instructions
Send a photo, voice message, video or any file. Give exactly one source:
path: a file on the server (from tg_get_media or inside TG_ALLOWED_ROOTS);
url: a public http(s) link that Telegram downloads itself;
content_base64 + filename: the file bytes, for clients that are not on the server.
send_as: auto picks by type, document keeps the original file, voice needs .ogg (opus) audio.
caption supports the same markdown as tg_send_message.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chat": "<chat>"
},
"name": "tg_send_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| chat | Yes | ||
| path | No | ||
| silent | No | ||
| caption | No | ||
| send_as | No | auto | |
| filename | No | ||
| reply_to | No | ||
| wait_reply | No | ||
| content_base64 | No |