read_messages
Read message history from any group by specifying chat ID, numeric ID, or chat name. Returns newest messages first with resolved sender names and expands merged forward messages automatically.
Instructions
[Official API + UAT fallback] Read message history from any group. Accepts oc_xxx ID, numeric ID, or chat name (auto-searched). Auto-falls back to UAT for external groups the bot cannot access. Returns newest messages first by default, with sender names resolved. Auto-expands merge_forward messages into their child messages (with original sender / time / content preserved) by default — disable with expand_merge_forward=false. Text messages have URLs extracted into urls; Feishu doc links are additionally surfaced as feishuDocs so agents can feed them straight into read_doc / get_doc_blocks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Chat ID (oc_xxx), numeric ID, or chat name (auto-searched via bot groups, im.chat.search, and user contacts) | |
| page_size | No | Messages to fetch (default 20, max 50) | |
| start_time | No | Start timestamp in seconds (optional) | |
| end_time | No | End timestamp in seconds (optional) | |
| sort_type | No | Sort order (default: ByCreateTimeDesc = newest first) | |
| expand_merge_forward | No | Auto-expand merge_forward placeholders into their child messages (default true). Children carry parentMessageId; use that id (not the child id) with download_message_resource (kind=image or file). |