Skip to main content
Glama
razvangirgiz

wazap-mcp

by razvangirgiz

Wait for new WhatsApp messages

wait_for_messages
Read-onlyIdempotent

Wait for new messages within a timeout, using a cursor to avoid missing messages between calls. Optionally filter for direct messages, mentions, and replies addressed to you.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoFrom the previous call
chat_idNoChat id, or a phone number
account_idNoAccount id
addressed_to_meNo
timeout_secondsNo

Output Schema

TableJSON 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. 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"
      +}
  2. Addedv0.15.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and non-destructive behavior. The description adds value beyond these by explaining cursor semantics ('nothing that lands between calls is missed') and the exact behavior of addressed_to_me (wakes only for direct messages, mentions, replies). No contradictions.

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 core action, no filler. Every clause contributes: the wait behavior, timeout, cursor use, filter semantics, and intended use case. Highly efficient.

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?

With an output schema present, return format is not required. The description covers waiting, timeout, cursor handling, and filter behavior. An agent has everything needed to call it correctly and integrate it into a polling loop. No critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60% — cursor, chat_id, and account_id have descriptions, but addressed_to_me and timeout_seconds do not. The description explicitly explains both: timeout_seconds via 'up to timeout_seconds' and addressed_to_me via its wake filter. This fully compensates for the undocumented parameters, going beyond 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?

The description clearly states the verb 'wait' with resource 'messages from other people' and a timeout. It distinguishes itself from read_messages by emphasizing waiting/blocking, and mentions the cursor for continuity. The purpose is specific and unambiguous.

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 phrase 'For agents that stay on the line' provides context for when to use this tool, and the cursor instruction implies a polling loop. However, it does not explicitly state when not to use it (e.g., for reading existing messages, use read_messages instead). The guidance is implied rather than explicit, so a 4 is appropriate.

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