Loading...
Loading...
User Guide for Feishu IM Message Reading Tool, covering session message retrieval, thread reply reading, cross-session message search, and image/file resource download. **Use this Skill when:** (1) Need to retrieve historical messages of group chats or one-on-one chats (2) Need to read reply messages in threads (3) Need to search messages across sessions (by keywords, senders, time, etc.) (4) Messages contain images, files, audio, video that need to be downloaded (5) Users mention "chat history", "messages", "what was said in the group", "thread replies", "search messages", "images", "file download" (6) Need to filter messages by time range or get more messages by pagination
npx skill4agent add larksuite/openclaw-lark feishu-im-readfeishu_im_user_get_messagesopen_idchat_idthread_idfeishu_im_user_get_thread_messagesfeishu_im_user_fetch_resourcemessage_idfile_keytype| User Intent | Tool | Required Parameters | Common Optional Parameters |
|---|---|---|---|
| Retrieve historical messages of group/one-on-one chats | feishu_im_user_get_messages | chat_id or open_id (choose one) | relative_time, start_time/end_time, page_size, sort_rule |
| Retrieve reply messages in threads | feishu_im_user_get_thread_messages | thread_id (omt_xxx) | page_size, sort_rule |
| Search messages across sessions | feishu_im_user_search_messages | At least one filter condition | query, sender_ids, chat_id, relative_time, start_time/end_time, page_size |
| Download images in messages | feishu_im_user_fetch_resource | message_id, file_key (img_xxx), type="image" | - |
| Download files/audio/video in messages | feishu_im_user_fetch_resource | message_id, file_key (file_xxx), type="file" | - |
relative_timepage_sizehas_more=truepage_tokenthread_idpage_size: 10, sort_rule: "create_time_desc"| Scenario | Action |
|---|---|
| Retrieve historical messages and need to understand context (default) | Call |
| User requests "complete conversation", "detailed discussion", "check replies" | Fetch all thread replies ( |
| User only browses message overview / User explicitly says not to view replies | Skip thread expansion |
feishu_im_user_search_messages| Parameter | Description |
|---|---|
| Search keywords, matching message content |
| List of sender open_ids |
| Session ID to limit search scope |
| List of open_ids of mentioned users |
| Message type: file / image / media |
| Sender type: user / bot / all (default is user) |
| Session type: group / p2p |
chat_idchat_typechat_namechat_partnerfeishu_im_user_fetch_resource| Resource Type | Marker Format in Content | fetch_resource Parameters |
|---|---|---|
| Image | | message_id= |
| File | | message_id= |
| Audio | | message_id= |
| Video | | message_id= |
message_idfile_keyfeishu_im_user_get_messagesfeishu_im_user_search_messages| Method | Parameter | Example |
|---|---|---|
| Relative Time | | |
| Exact Time | | ISO 8601 format: |
relative_timestart_time/end_timetodayyesterdayday_before_yesterdaythis_weeklast_weekthis_monthlast_monthlast_{N}_{unit}| Parameter | Format | Applicable Scenario |
|---|---|---|
| chat_id | | Known session ID (applicable to both group chats and one-on-one chats) |
| open_id | | Known user ID, retrieve one-on-one chat messages with this user (automatically parsed to chat_id) |
chat_id{ "chat_id": "oc_xxx" }thread_id{ "thread_id": "omt_xxx", "page_size": 10, "sort_rule": "create_time_desc" }{ "query": "project progress", "chat_id": "oc_xxx" }has_more: truepage_token: "xxx"{ "chat_id": "oc_xxx", "page_token": "xxx" }{ "message_id": "om_xxx", "file_key": "img_v3_xxx", "type": "image" }| Error Phenomenon | Root Cause | Solution |
|---|---|---|
| Too few message results | Time range is too narrow or time parameter is not passed | Infer an appropriate |
| Incomplete messages | Did not check has_more and paginate | Use page_token to paginate when has_more=true |
| Incomplete thread discussion content | Did not expand thread_id | Fetch thread replies when thread_id is detected |
| "open_id and chat_id cannot be provided at the same time" | Passed both parameters | Only pass one of them |
| "relative_time and start_time/end_time cannot be used at the same time" | Time parameter conflict | Choose one time filtering method |
| "No one-on-one chat session found with open_id=xxx" | No one-on-one chat record exists | Use chat_id instead, or confirm the existence of one-on-one chat |
| Empty thread message return | Incorrect thread_id format | Ensure it is in |
| Image/file download failed | file_key or message_id does not match | Confirm file_key comes from the corresponding message_id |
| Insufficient permissions | User has not authorized or has no permission | Confirm OAuth authorization is completed and the user is a member of the session |