Skip to main content
Glama

im_list_messages

Retrieve historical messages from a chat or thread using chat ID. Supports time range, sorting, and pagination for efficient access.

Instructions

获取会话(单聊/群聊)的历史消息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_timeNo结束时间(秒级时间戳)
page_sizeNo分页大小
sort_typeNo排序方式
page_tokenNo分页标记
start_timeNo开始时间(秒级时间戳)
container_idYes会话 ID(chat_id 或 thread_id)
container_id_typeNo会话类型chat
Behavior2/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It only states what the tool does (get messages) but does not disclose read-only nature, pagination behavior, time filters, or any side effects. The description adds minimal value beyond the tool name for behavior.

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 a single, concise sentence that immediately conveys the tool's purpose. It is front-loaded, with no unnecessary words or filler, making it an efficient and well-structured description.

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

Completeness3/5

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

The schema is rich with parameter descriptions, and the description clearly identifies the tool's core function. However, with no output schema and no mention of pagination or time-filter options in the description, an agent might lack full context on response format or edge cases. Combined with the schema, it is adequately complete for a straightforward list tool, but gaps remain.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does not add any parameter-specific information beyond what the schema already provides. However, the schema itself is self-explanatory with descriptions for each parameter, so no further compensation is needed.

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 retrieves historical messages from a conversation, distinguishing it from siblings like im_list_chats (which lists chats) and im_send_message (which sends messages). The verb '获取' + resource '历史消息' is specific and unambiguous.

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 usage for retrieving chat history but does not explicitly state when to use this tool versus alternatives like im_list_chats. No exclusion criteria or alternative tool references are provided, but the context of 'historical messages' gives reasonable guidance.

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/akakenle/feishu-wiki-mcp'

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