Count matching messages
telegram_count_messagesCount messages matching a text in one chat or across all chats without returning them. Use it to size a search before reading results.
Instructions
Counts the messages that match a text, in one chat or across all of them, without returning them. Use it to size a search before reading the results.
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": {
"query": "<query>"
},
"name": "telegram_count_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | Only count in this chat. The chat: 'me' for Saved Messages, an @username, or a numeric chat id as listed by telegram_list_chats. Invite links are not accepted. | |
| query | Yes | The text to look for. |