Skip to main content
Glama

read_messages

Read message history from any Feishu group using chat ID, numeric ID, or name. Automatically resolves sender names, expands merged forwards, and extracts URLs and doc links for direct use.

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.

Sender semantics (v1.3.12): each message has a displayLabel (e.g. 周宇, [Bot] Claude聊天助手, [匿名], [系统], [已撤回] 怪兽) — prefer it over raw senderId when narrating who-said-what. Also surfaced: senderType (user|app|anonymous), senderIdType (open_id|union_id|user_id), senderTenantKey, isExternal (cross-tenant), isRecalled, isThreadReply (parent_id present). merge_forward children carry originChatId (the chat the conversation came from, NOT the chat you queried) and best-effort forwardedFromChatName — do NOT treat children as native messages of the current group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesChat ID (oc_xxx), numeric ID, or chat name (auto-searched via bot groups, im.chat.search, and user contacts)
end_timeNoEnd timestamp in seconds (optional)
via_userNov1.3.12 — explicit identity override. `true` skips the bot path and reads directly via UAT (use when the chat is yours / external and you know bot has no access). `false` skips UAT fallback and surfaces the bot error instead of cross-identity hop (use when you specifically want the bot view). Omit for default auto-fallback (bot first, UAT on failure).
page_sizeNoMessages to fetch (default 20, max 50)
sort_typeNoSort order (default: ByCreateTimeDesc = newest first)
page_tokenNoPagination cursor — pass the pageToken from a previous response to fetch the next (older) page when hasMore is true.
start_timeNoStart timestamp in seconds (optional)
expand_merge_forwardNoAuto-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).
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It extensively discloses behaviors: auto-fallback to UAT for inaccessible groups, auto-expanding merge_forward placeholders, sender semantics (displayLabel, senderType, etc.), child messages carrying originChatId, and URL extraction. This far exceeds typical transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but structured with clear sections (core behavior, sender semantics, merge_forward children). Every sentence provides necessary detail without fluff. It is front-loaded with the primary purpose and progressively dives into edge cases, earning its length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 8 parameters and no output schema, yet the description is remarkably complete. It covers pagination, sender field semantics, merge_forward child handling, URL/document link extraction, and cross-tenant behavior. This addresses the full complexity of the tool without needing an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds substantial semantic value beyond the schema. It explains chat_id auto-searching, via_user's three-mode behavior, expand_merge_forward's effect on child message IDs, and pagination via page_token with hasMore. These additions materially improve parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb and resource: 'Read message history from any group.' It distinguishes itself from siblings like read_p2p_messages and search_messages by focusing on group history and auto-search capabilities, making its scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit usage guidance including when to use the UAT fallback (external groups), how to handle merge_forward messages (disable with expand_merge_forward=false), and directs feeding extracted URLs into read_doc / get_doc_blocks. It also clarifies via_user semantics for identity overrides, giving clear when-to-use versus when-not-to-use context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EthanQC/feishu-user-plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server