Telegram channels
v0.1.0Read, search and analyze Telegram channels from your own account, post with preview
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_chats
List the user's Telegram dialogs: channels, groups and private chats, most recent first. Use admin_only=true to get only channels and groups the user owns or administers
| Parameter | Type | Description |
|---|---|---|
admin_only | boolean | |
kind | string | |
limit | integer |
read_messages
Read the latest messages or posts of a channel, group or private chat, newest first. chat: @username, t.me link or numeric id from list_chats. For older messages pass offset_id = the smallest id you already got. Text longer than max_chars is cut, use 0 for full text
| Parameter | Type | Description |
|---|---|---|
chat * | string | |
limit | integer | |
max_chars | integer | |
offset_id | integer |
search_messages
Full-text search inside one channel or chat using Telegram's own search, newest matches first
| Parameter | Type | Description |
|---|---|---|
chat * | string | |
query * | string | |
limit | integer | |
max_chars | integer |
channel_stats
Channel statistics: subscribers, views and reactions of the last N posts, average and median views, engagement rate and posting frequency. Works for any public channel, best for the user's own ones
| Parameter | Type | Description |
|---|---|---|
channel * | string | |
posts | integer |
top_posts
Best posts of a channel for the last N days, ranked by views, reactions, forwards or comments
| Parameter | Type | Description |
|---|---|---|
channel * | string | |
days | integer | |
limit | integer | |
sort_by | string |
get_comments
Read comments under a channel post. Comment ids from here are used as comment_id in reply_comment
| Parameter | Type | Description |
|---|---|---|
channel * | string | |
post_id * | integer | |
limit | integer | |
max_chars | integer |
publish_post
Publish a post to the user's own channel, optionally with one image. DANGEROUS: the post becomes visible to all subscribers. Without confirm_token nothing is sent: you get a preview and a confirm_token. Show the preview to the user and repeat the call with the same arguments and confirm_token ONLY after the user explicitly approves this exact text and channel. image: local .jpg/.jpeg/.png/.webp/.gif file or https URL. With an image the caption limit is 1024 characters. markdown: **bold**, __italic__, `code`, [text](url)
| Parameter | Type | Description |
|---|---|---|
channel * | string | |
text * | string | |
confirm_token | ||
image | ||
parse_mode | string | |
silent | boolean |
reply_comment
Write a comment under a post of the user's own channel, or reply to a specific comment there (comment_id from get_comments). The reply is sent from the user's account. DANGEROUS: it is public. Without confirm_token nothing is sent: you get a preview and a confirm_token. Show the preview to the user and repeat the call with the same arguments and confirm_token ONLY after the user explicitly approves this exact text
| Parameter | Type | Description |
|---|---|---|
channel * | string | |
post_id * | integer | |
text * | string | |
comment_id | ||
confirm_token |