answerCallbackQuery
Answer callback queries from inline keyboards by sending a notification or alert to the user. Confirms success with True.
Instructions
Send answers to callback queries sent from inline keyboards. The answer is displayed as a notification at the top of the chat screen or as an alert. Returns True on success.
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": {
"callback_query_id": "<callback_query_id>"
},
"name": "answerCallbackQuery"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL that will be opened by the user's client. For game URLs or t.me deep links. | |
| text | No | Text of the notification. If not specified, nothing will be shown to the user. 0-200 characters. | |
| cache_time | No | Maximum time in seconds that the result of the callback query may be cached client-side. Defaults to 0. | |
| show_alert | No | If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. | |
| callback_query_id | Yes | Unique identifier for the query to be answered. |