Skip to main content
Glama

wechat_get_chat_history

Retrieves a friend or group chat's messages for a specified date by scanning backward through history, then returns the records in chronological order.

Instructions

获取指定好友或群聊在某一天的聊天记录。

自动向上回溯历史消息直到覆盖目标日期,再按日期过滤,返回按时间正序排列的记录。 目标日期较久远时可调大 max_messages。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_userYes好友或群聊的备注/昵称,需与微信中显示的名称完全一致
save_jsonNo是否把结果保存为 JSON 文件
folder_pathNo保存目录;留空则使用服务器配置的输出目录
target_dateYes目标日期。支持 YY/M/D(如 25/3/22,与旧版一致),也支持 2025-03-22、20250322、3/22、今天/昨天/前天
max_messagesNo最多向上回溯的消息条数,默认 2000;目标日期越久远需要调大
search_pagesNo在会话列表中滚动查找好友的次数;0 表示直接使用顶部搜索框
group_membersNo群成员昵称列表;传入可显著加快群聊记录中发送人的解析

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses the internal strategy (scroll back until the target date is covered, then filter by date) and the return ordering (ascending by time). It omits preconditions that matter for a UI-driven WeChat tool, such as the client being logged in/running, expected latency, or whether it mutates anything.

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?

Three tight sentences: purpose first, mechanism second, tuning tip last. Nothing is wasted and the most important information is front-loaded, which is exactly the right shape for a frequently-scanned tool description.

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?

For a 7-parameter tool with a full output schema and 100% schema coverage, the description supplies the missing behavioral layer (retrieval algorithm, ordering) that structured fields cannot express. The remaining gap is sibling disambiguation against wechat_search_chat_history, which is the one thing an agent could still get wrong.

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 schema already documents all seven parameters, including max_messages, search_pages and group_members. The description's only parameter note (raise max_messages for older dates) duplicates what the max_messages schema field already says, so it adds no new semantics – baseline 3 is appropriate.

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 states a specific verb and resource: retrieve chat records for a named friend or group on a specific day, with scope bounded to a single date. That is clear enough to act on, but it never distinguishes itself from the close sibling wechat_search_chat_history, so the agent must guess which retrieval tool applies.

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?

Usage is only implied by the artifact ('get a day's history for X'), with no explicit when-to-use framing and no mention of alternatives such as wechat_search_chat_history or wechat_get_recent_sessions. The one piece of practical guidance offered – increase max_messages for older dates – is tuning advice rather than usage routing.

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