Skip to main content
Glama
whatsapp-localmind

whatsapp-localmind

by qilaidev

whatsapp_fetch_messages

Fetch cleaned WhatsApp group messages by cursor or time window, resolving names, mentions, and reply chains while filtering revoked messages and adding context buffer.

Instructions

Fetch cleaned WhatsApp group messages by incremental cursor (after_msg_id) or time window (since). Automatically resolves real names, @mentions, 150-char reply chains, filters out revoked messages, and prepends context buffer messages.

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": {
      "chat_ids": "<chat_ids>"
    },
    "name": "whatsapp_fetch_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNo
sinceNoRelative duration (e.g. '12h', '24h', '7d') or ISO-8601 timestamp when after_msg_id is not set.24h
untilNoOptional upper bound ISO-8601 timestamp.
formatNomarkdown
chat_idsYesArray of group chat_ids (@g.us) or ['ALL_ALLOWED'].
fold_noiseNoFold consecutive short acknowledgment messages ('收到', 'OK', '+1') in markdown mode.
after_msg_idNoGlobal monotonic message cursor (Z_PK). Fetches only messages with msg_id > after_msg_id.
context_bufferNoNumber of preceding history messages to include as context buffer (default 10).
limit_per_chatNoMax messages per group chat (default 500, max 3000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does unusually well: it discloses that names and @mentions are resolved, replies are truncated to 150 chars, revoked messages are filtered out, and context buffer messages are prepended. It still omits pagination semantics beyond the cursor, any permission/auth constraints, and rate or size limits.

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?

A single dense sentence that front-loads the verb, resource, and retrieval modes, then lists the value-adding transformations. No filler and no restatement of the tool name or title.

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 a 9-parameter tool with no annotations and no output schema, the description explains the two retrieval modes and the output-shaping pipeline well, but leaves the return format (markdown vs json), the 'ALL_ALLOWED' chat_ids convention, and per-chat limits undocumented anywhere in prose.

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 78%, so the schema already documents most parameters, and the baseline is a 3. The description reinforces the cursor-versus-window choice and the context-buffer behavior, but adds nothing about the 'ALL_ALLOWED' sentinel for chat_ids, limit_per_chat, fold_noise, or format.

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 and resource ('Fetch cleaned WhatsApp group messages') and names the two retrieval modes (incremental cursor via after_msg_id, or time window via since). It is clear what the tool returns, though it never names or contrasts itself with siblings such as whatsapp_search_messages.

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 implicitly tells the agent that two access patterns exist and that cursor-based fetching is one option, while the schema notes since is used 'when after_msg_id is not set'. However there is no explicit when-to-use / when-not-to-use guidance and no pointer to the search or list-groups siblings for other needs.

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