Skip to main content
Glama
razvangirgiz

wazap-mcp

by razvangirgiz

Wait for new WhatsApp messages

wait_for_messages
Read-onlyIdempotent

Blocks until a WhatsApp message arrives, returns it or empty on timeout, so agents receive messages without polling while using a cursor to avoid gaps.

Instructions

Block until a message arrives, then return it, or return empty when the timeout passes. This is how an agent stays on the line without polling: call it in a loop, and pass the cursor it returns into the next call so nothing that landed between two calls is missed. The first matching message starts a one-second settle so a burst comes back together.

Only messages from other people are returned, never the user's own, and never WhatsApp's system notices. With addressed_to_me, only direct messages, group messages that @-mention the user, and replies to the user's own messages wake the wait; everything else in a group is ignored. A cursor from a previous run of wazap cannot be honoured: the wait then starts from now and says cursor_reset.

The timeout is capped at 55 seconds because MCP clients give up at 60.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoThe cursor returned by the previous call
chat_idNoOnly messages in this chat
account_idNoRegistry account id (default, work, …). Omit to resolve from chat_id or message_id, or the default account.
addressed_to_meNoOnly direct messages, @-mentions of the user and replies to the user's messages
timeout_secondsNoHow long to wait (1-55 s)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4.6/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it blocks until a message arrives, returns empty on timeout, returns only messages from other people, ignores WhatsApp system notices, supports addressed_to_me filtering, resets cursors from previous runs, and caps timeouts at 55 seconds due to MCP client limits. These are exactly the operational details an agent needs and are not covered by the readOnly/idempotent annotations.

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?

The core purpose is stated first, followed by usage, filtering behavior, cursor rules, and timeout limits. Every sentence adds a distinct operational detail, and there is no redundant or filler content.

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?

Given the lack of an output schema, the description explains what is returned (a message or empty) and how cursors work. Annotations cover safety and openness, while the description covers blocking semantics, filtering, cursor reset, and timeout constraints. Nothing essential for correct use appears missing.

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?

Although schema description coverage is 100%, the description adds meaningful semantics beyond the schema: cursor must be passed from the previous call and cannot be honored across runs, addressed_to_me has specific wake conditions, and the timeout cap is explained by MCP client limits. This meaningfully improves correct invocation.

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?

The description states a specific blocking behavior: wait until a message arrives, return it, or return empty on timeout. It distinguishes itself from polling-based siblings by explaining it is how an agent stays on the line without polling, though it does not name specific sibling tools like read_messages or get_recent_messages.

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?

It gives clear operational guidance: call in a loop, pass the cursor from the previous call, and rely on the timeout. It explains filtering behavior and cursor reset conditions, but does not explicitly name alternative tools or state when not to use this tool versus read_messages.

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