Skip to main content
Glama

read_messages

Retrieve message history from any group using chat ID, numeric ID, or name. Supports auto-fallback to UAT for external groups, returns newest messages first, and extracts URLs and Feishu document links.

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

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesChat ID (oc_xxx), numeric ID, or chat name (auto-searched via bot groups, im.chat.search, and user contacts)
page_sizeNoMessages to fetch (default 20, max 50)
start_timeNoStart timestamp in seconds (optional)
end_timeNoEnd timestamp in seconds (optional)
sort_typeNoSort order (default: ByCreateTimeDesc = newest first)
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).
Behavior4/5

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

With no annotations, the description carries the full burden of disclosure. It reveals several key behaviors: auto-fallback to UAT, default sort order (newest first), auto-expansion of merge_forward messages with preservation of original sender/time/content, extraction of URLs into a field, and Feishu doc links. It also explains how to use the parentMessageId with another tool. However, it does not mention rate limits, authentication requirements, or potential errors.

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

Conciseness4/5

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

The description is concise yet informative, using bullet points (dashes) effectively to list key features. It front-loads the core purpose and falls back to details. Every sentence adds value; no unnecessary repetition. It could potentially be more compact, but it's well-structured.

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

Completeness4/5

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

Given no output schema, the description adequately covers what the tool returns: newest messages first, sender names resolved, urls, feishuDocs, and the merge_forward expansion behavior. It doesn't detail the exact structure of the output, but for a list tool this is sufficient. Sibling tools are diverse, and this description clarifies its unique role.

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

Parameters4/5

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

Input schema covers 100% of parameters, so baseline is 3. The description adds value by explaining the auto-search behavior of chat_id, the default true for expand_merge_forward, and the use of sort_type. It also provides context for the expand_merge_forward parameter, linking it to download_message_resource.

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 reads message history from any group, with specific features like auto-fallback to UAT, auto-expansion of merge_forward messages, and URL/doc extraction. It uses a specific verb ('read') and resource ('messages'), and distinguishes from siblings like read_p2p_messages which is for peer-to-peer chats.

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

Usage Guidelines3/5

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

The description provides implicit guidance on when to use the tool (for group messages) and details about ID formats and fallback behavior, but it does not explicitly state when not to use it or name alternatives. For example, it could mention read_p2p_messages for peer-to-peer chats or search_messages for filtered queries.

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