Skip to main content
Glama
WhatsApp MCP Server

WhatsApp MCP Server

search_contacts

Find WhatsApp contacts by name, partial name, phone number, or JID and return matched names, numbers, JIDs, and last interaction timestamps to identify who you need.

Instructions

Search contacts across WhatsApp chat sessions and contact records. Returns matched contact names, phone numbers, JIDs, and last interaction 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_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of contact matches to return (default 30, max 100).
queryYesName, partial name, phone number, or JID to search for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 disclosure burden. It usefully reveals that results are drawn from two sources (chat sessions and contact records) and lists what each match contains, including last interaction timestamps, but says nothing about read-only intent, permissions, ordering, or what happens when nothing matches.

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?

Two sentences, zero padding, with the scope stated first and the return payload second. Nothing is redundant with the title and nothing needs to be re-read.

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?

There is no output schema, so the description appropriately covers the return shape (names, phone numbers, JIDs, timestamps). For a two-parameter read tool this is nearly complete; only match-ordering and empty-result behavior are left unstated.

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 both `query` (name, partial name, phone, JID) and `limit` (default 30, max 100) fully documented in the schema. The description adds no syntax, matching-behavior, or limit guidance beyond that, so the baseline of 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?

States a specific verb and resource ('Search contacts') plus the scope it searches over ('across WhatsApp chat sessions and contact records') and enumerates the returned fields. An agent can distinguish it from search_messages on the basis of resource, though no sibling is explicitly named.

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: it is clearly the tool for locating a contact by name, partial name, phone, or JID, but there is no explicit when-to-use/when-not or reference to search_messages for message-content lookups. The agent must infer the routing from the resource name alone.

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