Skip to main content
Glama

search_contacts

Read-only

Find WhatsApp contacts by name, alias, or partial phone number and return one merged JID per person for use as the chat identifier in other tools.

Instructions

Find people by name, alias or part of a phone number.

Returns each person once with all JIDs (phone form and LID form are merged). Use the returned jid as chat in other tools.

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
limitNo
queryYes
accountNoAccount from list_accounts when several WhatsApp numbers are set up; default: default

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/closed-world/non-destructive, so the bar is lower, and the description still adds real behavior: results are deduplicated per person and phone-form and LID-form JIDs are merged. It does not mention result ordering, empty-result behavior, or truncation beyond the implicit limit.

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?

Three short lines, zero filler, with the core purpose front-loaded and the result-handling instruction placed where it is needed after the output note.

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?

An output schema exists so return values need no prose, and the description covers the essential contract: one entry per person plus canonical jid usage. It is only slightly short on limit/pagination and account-selection behavior for a three-parameter tool.

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?

With only 33% schema coverage, the description must compensate, and it does explain the query parameter's matching semantics (name, alias, partial phone number). However, it says nothing about the `limit` cap or default, nor about when the `account` selector matters for multi-number setups.

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 ('Find') and resource ('people') and enumerates the matching modes (name, alias, partial phone number), which cleanly separates it from list_chats and list_messages siblings.

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?

Gives clear operational context by telling the agent what to do with results ('Use the returned jid as `chat` in other tools'), which is the core reason to call this before chat-scoped tools. It stops short of naming alternatives or stating when not to use it versus list_chats.

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