Skip to main content
Glama
wechat-localmind

wechat-localmind

by qilaidev

wechat_search_messages

Read-onlyIdempotent

Search allowed WeChat direct chats, group chats, and official accounts by keyword, then return matching messages with surrounding context for targeted conversation review.

Instructions

Search keyword across allowed WeChat 1-on-1 direct chats, group chats, and official accounts (including zstd-compressed XML messages) and return matching messages with surrounding context.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "wechat_search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoForce immediate SQLCipher decryption and SQLite snapshot refresh.
limitNo
queryYesKeyword to search in message text and attachment titles.
sinceNoOptional time window filter (e.g. '30d', '7d').
formatNomarkdown
contextNoNumber of before/after context messages per match (default 3).
chat_idsNoOptional list of chat_ids or ['ALL_ALLOWED'] / ['ALL_DIRECT'] / ['ALL_GROUPS'].
chat_typeNoOptional session type filter ('all', 'direct', 'group', 'official').all

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.0.0
    • changedInput schema / properties / chat_ids / description
      Previous value: -"Optional list of group chat_ids (@chatroom) or ['ALL_ALLOWED']."New value: +"Optional list of chat_ids or ['ALL_ALLOWED'] / ['ALL_DIRECT'] / ['ALL_GROUPS']."
    • addedInput schema / properties / chat_type
      Added value: +{
      +  "default": "all",
      +  "description": "Optional session type filter ('all', 'direct', 'group', 'official').",
      +  "enum": [
      +    "all",
      +    "group",
      +    "direct",
      +    "official"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / fresh
      Added value: +{
      +  "default": false,
      +  "description": "Force immediate SQLCipher decryption and SQLite snapshot refresh.",
      +  "type": "boolean"
      +}
  2. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds real context beyond them: only "allowed" chats are searched (permission scoping) and zstd-compressed XML messages are handled transparently. It does not disclose truncation/limit behavior or what "fresh" refresh costs, which keeps it short of a 5.

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?

A single front-loaded sentence with the action first and scope second; no filler. The parenthetical on zstd-compressed XML is slightly incidental but still informative.

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?

For an 8-parameter search tool with no output schema, the description establishes scope and result shape but leaves result caps, the effect of 'fresh', and output format behavior unexplained. Adequate, but an agent must read the schema to call it confidently.

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 coverage is 75%, so most parameters are already documented; the description only loosely maps to chat_type ("direct chats, group chats, and official accounts"), context ("surrounding context"), and chat_ids ("allowed"). It says nothing about limit, since, format, or fresh beyond what the schema provides, so it sits at the baseline.

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?

States a specific verb ("Search keyword") and resource (WeChat messages) plus the scope of chat types searched and the shape of the result ("matching messages with surrounding context"). It doesn't explicitly contrast itself with wechat_fetch_messages, so sibling differentiation is only implicit.

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 implied rather than stated: an agent can infer this is the keyword-lookup path and that wechat_fetch_messages / wechat_list_chats cover other retrieval modes. There is no explicit when-to-use, when-not-to-use, or named alternative.

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