telegram_publish_photo
Publish a photo to a Telegram channel with an optional caption. Accepts local file paths, URLs, or Telegram file IDs, and supports Markdown or HTML caption formatting.
Instructions
Publish a photo to a Telegram channel with an optional caption.
Use this tool to post photos to a Telegram channel where the bot is an admin. The photo can include a text caption with formatting. The bot must have permission to post messages in the channel.
Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. photo: Photo to send. Can be: - File path to a local image file (e.g., '/path/to/image.jpg') - URL to a remote image (e.g., 'https://example.com/image.png') - Telegram file_id of a photo that exists on Telegram servers caption: Optional text caption for the photo. Supports Markdown or HTML formatting based on parse_mode. Maximum 1024 characters. parse_mode: Caption formatting mode. Options: 'Markdown', 'HTML', or 'None' for plain text. Default is 'Markdown'. disable_notification: If True, sends the photo silently (no notification to users). Default is False. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'.
Returns: A dictionary containing message_id, chat_id, date, caption, photo info, and link. If response_format='markdown', returns formatted text content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| photo | Yes | ||
| caption | No | ||
| channel_id | Yes | ||
| parse_mode | No | Markdown | |
| response_format | No | markdown | |
| disable_notification | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||