Skip to main content
Glama

Search Contacts

wa_search_contacts
Read-only

Find contacts in one of your WhatsApp accounts by name or number. Matching is case-insensitive and looks at saved names, the name the contact publishes for themselves, business names, and the number — so "+44 7700 900111" finds a contact stored as 447700900111. Returns an empty list if nothing matches. Set include_pictures to also get profile picture URLs, at most 10 matches per page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNohow many to return (default 500, max 2000; max 10 with include_pictures)
queryYesa name or number fragment; matching is case-insensitive and ignores punctuation in numbers
account_idYeswhich of your accounts to search, from wa_list_accounts
after_cursorNoreturn matches after this cursor; omit to start from the beginning
include_picturesNoalso return each match's profile picture URL. This looks every match on the page up on WhatsApp, so the page is capped at 10 and can take half a minute

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
totalYeshow many contacts matched in total, before the limit was applied
refusalNopresent only when the request was declined
contactsYes
has_moreNotrue when more contacts remain after this page
truncatedNotrue when more contacts exist than were returned
next_cursorNopass this as after_cursor to continue; page until has_more is false to read the whole address book

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, it discloses the pagination limit (10 with include_pictures) and the potential latency (half a minute), which is valuable for the agent to manage user expectations. No contradiction with the readOnlyHint.

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?

The description is a single paragraph with clear, dense information. It front-loads the main purpose and matching behavior. Some redundancy with the schema for parameter details but acceptable given the added value.

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?

Given the output schema exists and annotations cover read-only safety, the description fully addresses what an agent needs: the search scope, matching rules, pagination behavior, and the performance cost of including pictures. Nothing obvious is missing for correct invocation.

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 100%, so baseline is 3. The description adds the matching specifics (case-insensitive, ignoring punctuation) and the interplay between include_pictures and limit, which goes slightly beyond the schema, but the schema already covers each parameter individually.

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?

It clearly states the action (find contacts), the specific account context, and the matching criteria. It distinguishes itself from wa_list_contacts by focusing on search rather than listing all contacts.

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?

It gives clear context for when to use this tool (searching by name or number) and mentions the alternative wa_list_accounts for identifying the account. It doesn't explicitly exclude alternatives but the context is strong enough.

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.

Resources