search_messages
Find matching messages across Telegram channels, groups, and private chats by query, with optional date or time filters to narrow results.
Instructions
Search for messages in a Telegram channel, group, or private chat
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": {
"channel": "<channel>",
"query": "<query>"
},
"name": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of messages to retrieve (default: 10, max: 100) | |
| query | Yes | Search query | |
| channel | Yes | Channel username (@channelname), group username, private chat username (@username), phone number (+1234567890), or chat ID | |
| sinceDate | No | Search messages since this date (ISO format: 2023-12-01T10:00:00Z) | |
| sinceHours | No | Search messages from the last N hours | |
| sinceMinutes | No | Search messages from the last N minutes |