Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Set Webhook

wa_set_webhook

Register an HTTPS endpoint to receive WhatsApp events as they happen, so you do not have to poll wa_list_messages. By default it delivers inbound messages; pass events to also receive outbound messages (sent from your number), message delivery status (delivered/read/failed), account lifecycle events (connected, disconnected, unlinked, blocked), and call events (completed, missed). Returns a signing secret that is shown ONCE — store it immediately. Calling this again replaces the endpoint and issues a NEW secret.

Input Schema

NameRequiredDescriptionDefault
urlYesan https:// URL that will receive POSTed events; must be publicly reachable
eventsNowhich events to receive — any of message.inbound, message.outbound, message.status, account.connected, account.disconnected, account.unlinked, account.blocked, call.completed, call.missed; defaults to message.inbound

Output Schema

NameRequiredDescriptionDefault
urlNo
eventsNo
secretNothe signing secret — shown ONCE; store it now, it cannot be retrieved later
refusalNopresent only when the request was declined
webhook_idNo
verificationNo

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. Changed1 schema field changed
    • changedInput schema / properties / events / description
      Previous value: -"which events to receive; defaults to message.inbound"New value: +"which events to receive — any of message.inbound, message.outbound, message.status, account.connected, account.disconnected, account.unlinked, account.blocked, call.completed, call.missed; defaults to message.inbound"
  3. 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"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the call is non-idempotent in a consequential way ("Calling this again replaces the endpoint and issues a NEW secret") and that the returned signing secret is shown only once and must be stored immediately. That is exactly the operational context an agent needs before invoking a mutation, and it does not conflict with readOnlyHint=false or idempotentHint=false.

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 sentences, front-loaded with the core action, then defaults, then the destructive replacement warning. Every sentence carries distinct information with no redundancy.

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?

For a two-parameter mutation with full schema coverage and an output schema, this covers everything material: what it does, the default event scope, the security-sensitive return value, and the overwrite behavior. Nothing an agent needs to call it safely 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 the baseline is 3, but the description adds real meaning: it states the default event behavior (inbound messages only) and groups the optional events into outbound, delivery status, lifecycle, and call categories. It doesn't restate the events array enum values, but the schema already enumerates them fully.

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?

Starts with a specific verb+resource ("Register an HTTPS endpoint to receive WhatsApp events") and immediately scopes the effect (events arrive as they happen rather than by polling). It is trivially distinguishable from wa_get_webhook, wa_delete_webhook, and wa_enable_webhook, which share the resource but not the action.

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 a clear motivating context ("so you do not have to poll wa_list_messages") and warns about the replacement semantics of a repeat call. It stops short of naming the sibling tools for inspecting or removing an existing webhook, so the agent must infer that wa_get_webhook/wa_delete_webhook are the alternatives for those needs.

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