messages_press_button
Press a button under a message in a Telegram chat, as the connected Telegram account: the inline menus bots such as @BotFather reply with. Name the button by its exact label.
Returns the message as it looks after the press (bots usually edit it into the next menu) and anything the bot sent after it, each with its own buttons and a message_id you can pass back to press the next one.
Mini Apps: a button of kind web_app is opened in the workspace's hosted browser, signed in as the connected account; the result is {opened, page_id, title, host} and you continue with browser.snapshot, browser.click and browser.type on that page_id. Some settings of a bot exist only in its Mini App (for example @BotFather's Bot Settings): in that bot's thread pass open_main_app=true, with no message_id or button_text, to open the bot's main app (the Open button beside the input). The address of the app is a login and is never shown.
Refused: buttons that need the account's cloud password (the owner confirms those in the Telegram app), and buttons that share a phone number or location or pay. A link button is not pressed; its URL is returned. A label that matches no button returns the buttons that exist.
Get the message_id from messages.read_history. Telegram user accounts only; a bot account cannot press buttons.
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": {
"thread_id": "<thread_id>"
},
"name": "messages_press_button"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | Thread containing the message (numeric DB id or channel_ref like 'telegram:123456789'). | |
| message_id | No | Message the button is under: a DB id from messages.read_history, or a 'telegram:<id>' returned by a previous press. Not needed with open_main_app. | |
| button_text | No | The button's label, exactly as shown (case is ignored if nothing matches exactly). Not needed with open_main_app. | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. | |
| open_main_app | No | true = open the main Mini App of the bot this thread is with (no button needed) in the hosted browser. OMIT to press a button. |