Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Block or Unblock Contact

wa_block_contact

Block a contact on one of your WhatsApp accounts, so they can no longer call or message it — or set unblock=true to unblock one. Reports who it acted on: their number, the name this account's address book has for them, and the country the number belongs to.

Input Schema

NameRequiredDescriptionDefault
jidYesthe contact — a phone number in international form or a full JID
unblockNotrue to unblock a previously blocked contact instead
account_idYesthe account, as returned by wa_list_accounts

Output Schema

NameRequiredDescriptionDefault
statusYesok (the operation succeeded) or refused (nothing was done)
blockedNoevery contact on the account's blocklist (wa_list_blocked only)
contactNothe contact that was blocked or unblocked (wa_block_contact only)
refusalNopresent only when status is refused

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +  ]
      +}
  2. 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"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / jid / description
      Previous value: -"the contact to block — a phone number in international form or a full JID"New value: +"the contact — a phone number in international form or a full JID"
    • addedInput schema / properties / unblock
      Added value: +{
      +  "description": "true to unblock a previously blocked contact instead",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / contact / description
      Previous value: -"the contact that was blocked or unblocked (wa_block_contact and wa_unblock_contact only)"New value: +"the contact that was blocked or unblocked (wa_block_contact only)"
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds genuine behavioral context beyond the annotations: the real-world consequence (contact can no longer call or message) and the shape of the result (number, address-book name, country). Annotations declare readOnlyHint=false and destructiveHint=false but say nothing about effect; the description fills that gap. It stops short of noting auth requirements or behavior on already-blocked/unknown contacts.

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, front-loaded with the primary operation and the consequence, followed by the alternate mode and result shape. No filler; every clause carries information.

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?

With a complete input schema, an output schema, and presence annotations, the description covers the remaining burden (effect of blocking, unblock mode) well. Minor gaps: no guidance on idempotency/already-blocked contacts and no cross-reference to wa_list_blocked, which sits right next to this 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?

Schema description coverage is 100%, so jid, account_id, and unblock are already fully documented (including the 'as returned by wa_list_accounts' hint). The description restates the unblock toggle and adds no new syntax or format detail, so the baseline 3 applies.

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 (block/unblock) on a specific resource (a contact on a WhatsApp account), plus the concrete effect ('can no longer call or message it'). Cleary distinguishes the two modes via the unblock flag, so an agent knows exactly what it does 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?

Gives clear context for use ('on one of your WhatsApp accounts') and explains the toggle case — set unblock=true to unblock rather than calling a different tool. It does not, however, reference siblings such as wa_list_blocked for checking current block state, nor does it state exclusions (e.g., what happens if the contact is already blocked).

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