messages_read_history
Read messages from a conversation thread. Use text_contains to find specific messages by content. text_contains searches the loaded part of the conversation and, when that is not all of it, asks the channel's own server (Telegram) to search the rest and stores the hits with their neighbouring messages. search_coverage says which: complete = true with a source, or complete = false with the reason, in which case an empty list is not proof the text is absent. Returns the most recent messages, including sender info and timestamps.
Voice calls: each row carries a meta object with allowlisted keys (event_type ∈ 'call_started'|'call_ended'|null, source ∈ 'voice_transcript'|null, call_id, speaker_display_name, duration_seconds, outcome, direction) plus per-message channel. To find calls without scanning every row, use calls.list_history instead.
Usage:
Get thread_id from threads.list first, OR
Use contact_name to auto-resolve thread_id
Examples:
User: 'show me messages from chat with [contact]' → read_history(contact_name='[contact]', limit=10)
User: 'last 5 messages from thread 571' → read_history(thread_id=571, limit=5)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of messages to return (default: 10, max: 100) | |
| offset | No | Number of messages to skip (for pagination, default: 0) | |
| thread_id | No | Thread ID from threads.list (e.g. '571'), or a channel_ref (e.g. 'telegram:1306644770'). Optional if contact_name provided. | |
| contact_name | No | Contact/thread name to search for (optional if thread_id provided). Example: 'Jane Smith', 'John Doe' | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. | |
| text_contains | No | Filter: only return messages containing this text (case-insensitive substring match) | |
| include_outgoing | No | Include messages sent by you (default: true) | |
| channel_account_id | No | Connected account the conversation must belong to, when you know it (from channels.list). Scopes the lookup to that account, so the same person reached on two connected accounts cannot be confused for one, and a chat that does not exist on this account is 'not found' instead of someone else's thread with a matching id. |