tg_person
Consolidate a person's profile, shared groups, chat ranking, and recent private messages in one call. Use it before writing to someone to see bio, username, online status, flags, and conversation history.
Instructions
Everything the account knows about one person, in a single call. Use this before writing to someone instead of chaining tg_chat_info, tg_contacts, tg_common_chats and tg_history.
Returns the profile (bio, @username, direct link, online status, birthday if Telegram exposes it, your private note on the contact), the flags that matter (bot, premium, verified, in your contacts, blocked), the groups you share, where the person sits in Telegram's own top-correspondents ranking, the last messages of your private conversation and when that conversation started.
Limit worth knowing: MTProto has no global search by author, so "what did this person write" here means your private chat only. For what they wrote in a shared group, call tg_history(chat=, from_user=).
Args: user: user id, @username, t.me link, exact name, or "me". messages: how many recent private messages to include; 0 drops the texts but keeps the counters (total messages, when the chat started). chats: how many shared groups to list; 0 skips the lookup. brief: drop reactions, link cards and edit times. Same messages, about a quarter smaller — for triage, not for reading a chat closely.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | ||
| brief | No | ||
| chats | No | ||
| messages | No |