Skip to main content
Glama

List Contacts

wa_list_contacts
Read-only

List or search the address book of one of your accounts. On WhatsApp these are the contacts saved on the phone the account is linked to; use the returned phone numbers with wa_send_message. On Telegram they are the account's saved contacts and the people it has a chat with; use each row's jid as to or chat with every other tool. Pass query to find someone by name or number (on Telegram also by username); matching looks at saved names, the name the contact publishes, business names and the number. On WhatsApp, set include_pictures to also get each contact's profile picture URL; that looks the contacts up on WhatsApp, so it returns at most 10 per page and is slower.

Input Schema

NameRequiredDescriptionDefault
limitNohow many to return (default 500, max 2000; max 10 with include_pictures)
queryNooptional: only contacts whose name or number (on Telegram also the username) contains this; case-insensitive and ignores punctuation in numbers, so '+44 7700 900111' finds 447700900111. Omit to list everything
account_idYeswhich of your accounts to read, from wa_list_accounts
after_cursorNoreturn contacts after this cursor; omit to start from the beginning
include_picturesNoWhatsApp only: also return each contact's profile picture URL. This looks every contact on the page up on WhatsApp, so the page is capped at 10 and can take half a minute; leave it off for a fast listing

Output 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. Changed5 schema fields changed
    • changedInput schema / properties / include_pictures / description
      Previous value: -"also return each contact's profile picture URL. This looks every contact on the page up on WhatsApp, so the page is capped at 10 and can take half a minute; leave it off for a fast listing"New value: +"WhatsApp only: also return each contact's profile picture URL. This looks every contact on the page up on WhatsApp, so the page is capped at 10 and can take half a minute; leave it off for a fast listing"
    • changedInput schema / properties / query / description
      Previous value: -"optional: only contacts whose name or number contains this; case-insensitive and ignores punctuation in numbers, so '+44 7700 900111' finds 447700900111. Omit to list everything"New value: +"optional: only contacts whose name or number (on Telegram also the username) contains this; case-insensitive and ignores punctuation in numbers, so '+44 7700 900111' finds 447700900111. Omit to list everything"
    • changedOutput schema / properties / contacts / items / properties / jid / description
      Previous value: -"WhatsApp's own identifier for this contact"New value: +"the network's own identifier for this contact; on a Telegram account pass this as to or chat to every other tool"
    • changedOutput schema / properties / contacts / items / properties / phone / description
      Previous value: -"the contact's number in international form — pass this to wa_send_message"New value: +"the contact's number in international form — on WhatsApp pass this to wa_send_message; on Telegram use jid instead"
    • addedOutput schema / properties / contacts / items / properties / username
      Added value: +{
      +  "description": "Telegram only: the contact's public username, without the @",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / refusal / properties / account_status / description
      Previous value: -"when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked"New value: +"when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked"
  3. Changed1 schema field changed
    • addedOutput schema / properties / refusal / properties / candidates
      Added value: +{
      +  "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the id to retry with as account_id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "the account's WhatsApp display name",
      +        "type": "string"
      +      },
      +      "phone": {
      +        "description": "the account's phone number, E.164",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  4. Changed3 schema fields changed
    • addedOutput schema / properties / refusal / properties / account_status
      Added value: +{
      +  "description": "when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / account_status_reason
      Added value: +{
      +  "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / since
      Added value: +{
      +  "description": "when the number stopped working, RFC3339, when known",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds real behavioral context beyond that: include_pictures triggers per-contact lookups on WhatsApp, capping pages at 10 and making the call slow, and it recommends leaving it off for a fast listing. It does not describe pagination/cursor behavior explicitly, which is the remaining gap.

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?

Four sentences, each containing distinct information: channel semantics, identifier routing, query matching, and the picture-lookup cost. It is dense but front-loaded and free of filler; the picture caveat is partly redundant with the schema's own description, slightly diluting the tightness.

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 not be explained, and the description covers the channel-dependent meaning of the results and the cost tradeoff. For a read-only listing tool with four optional parameters this is close to complete; only explicit cursor/paging guidance is missing.

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 baseline is 3, but the description adds cross-channel meaning the schema does not: query matches on Telegram also by username, and include_pictures is WhatsApp-only with the page cap consequence restated in context. The after_cursor parameter is left entirely to the schema.

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 ('List or search the address book of one of your accounts') and immediately differentiates what the resource means per channel (WhatsApp phone contacts vs Telegram saved contacts plus chat partners). An agent can tell this apart from siblings like wa_list_accounts or wa_list_blocked without opening the schema.

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?

Explicitly routes the agent downstream: use returned phone numbers with wa_send_message, use each row's jid as 'to'/'chat' with every other tool. It also gives the conditions for query and include_pictures. It does not say when to prefer this over adjacent listing tools such as wa_list_blocked, which keeps it short of a 5.

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