Skip to main content
Glama

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

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).
Behavior5/5

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

Despite no annotations, the description thoroughly discloses behavioral traits: returns newest first, auto-expands merge_forward messages, extracts URLs and Feishu doc links, and auto-falls back to UAT. It also notes defaults and optional disabling, providing full transparency for a read-only operation.

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 a single coherent paragraph that front-loads the purpose and adds details. It is fairly concise with no fluff, though slightly dense. A more structured format could improve readability, but it remains effective.

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?

Without an output schema, the description covers key return details (ordering, sender names, merge expansion, URL extraction). It misses error handling or rate limits but is otherwise comprehensive for a read tool with well-documented parameters.

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?

All parameters are described in the schema, but the description adds value by explaining auto-searching for chat_id, default behavior for expand_merge_forward, and the parentMessageId context. This goes beyond the schema's field descriptions.

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

Purpose4/5

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

The description clearly states it reads message history from any group, specifying accepted ID formats and auto-fallback behavior. It distinguishes from sibling tools like read_p2p_messages by focusing on group chats, but does not explicitly differentiate from other read tools.

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 implies this tool is for reading message history, with auto-fallback for external groups. However, it does not provide explicit when-not-to-use guidance or mention alternatives like read_p2p_messages for peer-to-peer chats.

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