Tools
Ten tools. Five only read from Telegram; sending text or files and signing out require confirm: true.
Reading
| Tool | Parameters | What it does |
|---|---|---|
status | — | Shows whether you are signed in and which account is connected |
list_dialogs | query, limit ≤ 50, archived | Recent chats: ID, title, @username and unread count |
get_messages | peer, limit ≤ 50, offsetId | Chat history older than offsetId, without marking messages as read |
search_messages | query, peer, limit ≤ 30 | Search across all chats or within one |
download_media | peer, messageIds ≤ 20 | Saves photos and documents up to 50 MB in the local downloads/ folder and returns their paths |
Writing and account access
| Tool | Parameters | What it does |
|---|---|---|
send_message | peer, text ≤ 4096, confirm, replyTo | Sends text, as a reply when replyTo is set |
send_file | peer, path, caption ≤ 1024, asPhoto, confirm, replyTo | Sends a local file up to 50 MB by absolute path, as a document or a JPG/PNG photo |
login_send_code | phone | Requests a sign-in code |
login_sign_in | code, password | Completes sign-in, with a two-step verification password if required |
logout | confirm | Closes only the telegram-mcp session |
Specifying a chat
The peer parameter accepts three forms:
1234567890— an ID fromlist_dialogs;@username— a public username;title:Name— a title among the most recent 200 chats. If several match, the server lists them instead of choosing one.
Response format
{
"id": 4812,
"date": "2026-10-27T18:04:11.000Z",
"out": false,
"sender": "Andrey",
"text": "We are moving the release to Friday",
"textTruncated": false,
"replyTo": null,
"media": null
}Message text is truncated to 1,500 characters, with textTruncated indicating the cut. Attachments themselves are not included, only their type; use download_media to fetch the files.