Skip to main content
Glama
WhatsApp MCP Server

WhatsApp MCP Server

search_messages

Search WhatsApp message history by keyword or phrase to return matching messages with full conversation context, timestamps, optional chat filtering, and pagination.

Instructions

Search message history for specific keywords or phrases. Returns matching messages with full conversation context and timestamps.

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": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default 30, max 200).
queryYesSearch term to locate in message text.
offsetNoPagination offset.
chat_idNoOptional chat JID or contact name to restrict search within.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the return shape ('matching messages with full conversation context and timestamps'), which is useful, but says nothing about read-only semantics, pagination behavior beyond the schema, result ordering, or rate limits for a search 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?

Two tightly written sentences with the core action front-loaded and the return content second. No filler, though it is short enough that some clarifying detail could have been added without bloat.

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?

With no output schema, the description correctly covers what is returned, and all four parameters are documented in the schema. However, matching semantics and guidance relative to list_messages/get_message_context are missing, leaving the agent to guess about result relevance and tool selection.

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%, with query, limit, offset, and chat_id all documented in the schema itself. The description adds no extra meaning such as matching semantics (substring vs whole-word, case sensitivity) or how chat_id resolution works, so baseline 3 applies.

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 gives a specific verb and resource ('Search message history') plus the target ('specific keywords or phrases'), so the agent knows exactly what the tool does. It stops short of contrasting with siblings like list_messages or get_message_context, so differentiation is left to inference.

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: needing to find messages by keyword. There is no explicit when-to-use vs list_messages/get_message_context guidance or any stated exclusions, so the agent must infer routing from the sibling names alone.

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