get_private_messages
Retrieve messages from a private Telegram chat by contact username, phone number, or user ID, with filters for date, time range, message limit, and pagination.
Instructions
Get messages from a private chat conversation
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": {
"contact": "<contact>"
},
"name": "get_private_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | IANA time zone used to resolve date-only sinceDate and 'today'/'yesterday' (e.g., Europe/Kyiv). Default: UTC | |
| limit | No | Number of messages to retrieve (default: 10, max: 100) | |
| contact | Yes | Contact identifier: username (@username), phone number (+1234567890), or user ID | |
| offsetId | No | Return messages older than this message ID (pass nextOffsetId from the previous page to paginate) | |
| sinceDate | No | Get messages since this date. Accepts a full ISO datetime, a plain date (midnight in tz), or 'today' / 'yesterday' | |
| sinceHours | No | Get messages from the last N hours | |
| sinceMinutes | No | Get messages from the last N minutes | |
| maxTextLength | No | Truncate each message text to this many characters |