Messaging Tools
This document details the messaging tools.
Tool List
| Tool | Function | Required Params |
|---|---|---|
| feishu_im_user_get_messages | Get group/DM history | chat_id or open_id |
| feishu_im_user_get_thread_messages | Get thread replies | thread_id |
| feishu_im_user_search_messages | Cross-session search | At least one filter |
| feishu_im_user_fetch_resource | Download images/files | message_id, file_key, type |
Usage Examples
Get Group Chat History
json
{
"action": "list",
"chat_id": "oc_xxxxx",
"relative_time": "this_week",
"page_size": 50
}Get Private Messages
json
{
"action": "list",
"open_id": "ou_xxxxx",
"start_time": "2026-02-01T00:00:00+08:00",
"end_time": "2026-02-28T23:59:59+08:00"
}Search Messages
json
{
"action": "list",
"query": "keyword",
"sender_ids": ["ou_xxxxx"],
"chat_type": "group"
}Download Image
json
{
"message_id": "om_xxxxx",
"file_key": "img_xxxxx",
"type": "image"
}Time Filtering
Relative Time
| Value | Description |
|---|---|
| today | Today |
| yesterday | Yesterday |
| this_week | This week |
| last_week | Last week |
| last_3_days | Last 3 days |
Exact Time
json
{
"start_time": "2026-02-01T00:00:00+08:00",
"end_time": "2026-02-28T23:59:59+08:00"
}Pagination
page_sizerange: 1-50, default 50- When
has_more: true, usepage_tokento get next page