Skip to main content
Glama
wazap-mcp

wazap-mcp

by razvangirgiz

Wait for new WhatsApp messages

wait_for_messages
Read-onlyIdempotent

Waits for incoming WhatsApp messages up to a timeout and returns them with a cursor so agents can continue without missing messages between calls.

Instructions

Wait for messages from other people, up to timeout_seconds, and return them with a cursor: pass it to the next call so nothing that lands between calls is missed. addressed_to_me wakes only for direct messages, mentions and replies to the user. For agents that stay on the line.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wait_for_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNoFrom the previous call
chat_idNoChat id, or a phone number
account_idNo
addressed_to_meNo
timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault
countYes
cursorYesPass to the next call
messagesYes
timed_outYes
account_idYes
cursor_resetYesThe cursor was from another run; the wait started now

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.7.4
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / properties / messages / items / additionalProperties
      Previous value: -trueNew value: +{}
  2. Changed1 schema field changedv1.6.0
    • removedInput schema / properties / account_id / description
      Removed value: -"Account id"
  3. Changed6 schema fields changedv1.0.3
    • changedInput schema / properties / account_id / description
      Previous value: -"Registry account id (default, work, …). Omit to resolve from chat_id or message_id, or the default account."New value: +"Account id"
    • removedInput schema / properties / addressed_to_me / description
      Removed value: -"Only direct messages, @-mentions of the user and replies to the user's messages"
    • changedInput schema / properties / chat_id / description
      Previous value: -"Only messages in this chat"New value: +"Chat id, or a phone number"
    • changedInput schema / properties / cursor / description
      Previous value: -"The cursor returned by the previous call"New value: +"From the previous call"
    • removedInput schema / properties / timeout_seconds / description
      Removed value: -"How long to wait (1-55 s)"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "account_id": {
      +      "type": "string"
      +    },
      +    "count": {
      +      "type": "number"
      +    },
      +    "cursor": {
      +      "description": "Pass to the next call",
      +      "type": "string"
      +    },
      +    "cursor_reset": {
      +      "description": "The cursor was from another run; the wait started now",
      +      "type": "boolean"
      +    },
      +    "messages": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "chat_id": {
      +            "type": "string"
      +          },
      +          "message_id": {
      +            "type": "string"
      +          },
      +          "private": {
      +            "const": true,
      +            "description": "Tagged #private: no words",
      +            "type": "boolean"
      +          },
      +          "text": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "message_id",
      +          "chat_id",
      +          "text",
      +          "timestamp"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "timed_out": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "messages",
      +    "cursor",
      +    "timed_out",
      +    "cursor_reset",
      +    "account_id"
      +  ],
      +  "type": "object"
      +}
  4. Addedv0.15.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, idempotent and non-destructive, so the safety profile is covered. The description adds genuinely new behavior: the call blocks up to timeout_seconds, the cursor guarantees continuity between calls, and addressed_to_me narrows waking to DMs, mentions and replies. It does not say what happens when the timeout elapses with no messages.

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?

Three compact sentences with the core action and timeout constraint front-loaded, followed by cursor chaining and the addressed_to_me filter. The closing line 'For agents that stay on the line' is evocative but slightly soft compared with the rest of the text.

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 spelled out, and the description covers the blocking semantics and cursor protocol that an agent most needs. The one gap is explicit timeout/no-message behavior, which the agent must infer from the output schema.

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 only 40%, so the description must compensate. It gives real meaning to the two subtle parameters — cursor as a continuity token to thread into the next call, and addressed_to_me as a DM/mention/reply filter — while chat_id and account_id remain undocumented in either place.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: wait for messages from other people, bounded by timeout_seconds, returning messages plus a cursor. That is clearly distinct from a passive read, though it never names a sibling like read_messages to make the boundary explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'For agents that stay on the line' implies the long-polling/streaming use case, and the cursor instruction tells the agent how to chain calls. However, there is no explicit when-to-use vs. read_messages or catch_up guidance, and no statement of when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.