Skip to main content
Glama

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

TableJSON 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

TableJSON 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. 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"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already fix the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds genuine behavioral context: the blocked contact can no longer call or message. It does not say whether the contact is notified, whether re-blocking is a no-op, or what permissions/auth the account needs, so it adds value but not full disclosure.

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?

One front-loaded sentence states the action and the inverse mode, followed by a short clause on what is reported. Nothing is wasted, and the em dash cleanly separates the two modes.

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 an output schema present, the description need not explain return values (though it usefully previews them), and all three parameters are documented. The remaining gap is operational: no mention of side effects on existing chats, reversibility guarantees, or notification behavior for a mutation tool, which keeps it from being fully complete.

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%: jid, unblock, and account_id are all documented in the schema itself, including that unblock=true reverses the action. The description's phrasing of the toggle largely restates that, adding only the framing of block as the default mode, so 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 one of your WhatsApp accounts), and explicitly covers the inverse mode via unblock=true. An agent can distinguish this from wa_list_blocked (a read) and wa_leave_chat without opening either 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?

The default mode (block) and the opt-in alternative (unblock=true) are stated clearly, which covers the main routing decision between the tool's two behaviors. It stops short of naming the sibling to use for inspecting blocked contacts (wa_list_blocked) or stating any exclusion/precondition, so it is clear context without explicit alternatives.

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