Skip to main content
Glama

Perisclaw: Use ChatGPT and Claude with your WhatsApp

Search Messages

search_messages
Read-only

Hybrid semantic and full-text search across WhatsApp messages. Returns relevant messages with authoritative chat and sender metadata, authorship provenance, and quoted-message context when present. Use this for finding past conversations by meaning or keyword. Pass a natural-language query. The semantic path uses the full text; the FTS path safely tokenises it as ANY-of-these words. FTS operators, quotes, and * are stripped rather than interpreted.

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
limitNoMax results to return. Default 20, max 100.
queryYesNatural-language meaning or plain keywords. The semantic and FTS paths run together.
sinceNoOptional lower bound on message time — an ISO 8601 timestamp (e.g. "2026-06-16T09:30:00Z"). Epoch-ms also accepted.
untilNoOptional inclusive upper bound on message time. ISO 8601 or epoch-ms.
chat_idNoOptional chat JID to restrict the search to one chat.
from_meNoOptional direction filter: true for operator/agent messages, false for counterparties.
sender_idNoOptional sender JID. Resolve a named person with search_contacts first, then pass the returned contact_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare this is a non-destructive read (readOnlyHint true, destructiveHint false), so the bar is lower. The description still adds real behavioral detail: returned messages carry authoritative chat/sender metadata, authorship provenance, and quoted-message context, and the query-handling behavior (semantic vs FTS tokenisation, operators/quotes/* stripped rather than interpreted) is a non-obvious trait worth disclosing.

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?

Five short sentences, front-loaded with purpose, then return shape, then usage, then query semantics. Each sentence adds distinct information with no repetition of the schema.

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

Completeness5/5

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

No output schema exists, so the description takes on responsibility for explaining returns — and it does (relevant messages, chat/sender metadata, provenance, quoted context). All 7 params are schema-documented, so the description need not repeat them, and the query-behavior note fills the remaining gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3. The description adds value beyond the schema by explaining how the query is processed across both search paths and that FTS operators are stripped, which clarifies what the query parameter actually does. It does not, however, explain interactions between filters (e.g., since/until combined with query).

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?

States a specific verb and resource with scope: 'Hybrid semantic and full-text search across WhatsApp messages.' This clearly distinguishes it from siblings like get_messages (retrieval), search_chats (chat lookup), and search_contacts (people lookup).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this for finding past conversations by meaning or keyword. Pass a natural-language query' gives clear usage context. However, it never explicitly names alternatives or exclusions (e.g., when to prefer get_messages or search_chats over this), leaving that inference to the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.