Skip to main content
Glama

wait_for_messages

Long-poll for up to 60 seconds and return as soon as a new WhatsApp message arrives, optionally for one chat; timed_out=true means no message arrived.

Instructions

Long-poll up to 60 s: return as soon as a new message arrives (optionally in one chat). timed_out=true when nothing arrived.

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
chatNoOnly wake for this chat (number or JID).
timeout_sNoHow long to wait, in seconds (1-60).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioral burden. It does well on the blocking trait (up to 60 s, returns early on arrival) and discloses the timed_out outcome flag, but it omits other important traits: what happens on cancellation, whether the wait consumes or marks messages read, and what the payload contains on success.

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 compact clauses, front-loaded with the blocking behavior and capped by the key return signal. No filler, no redundancy.

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?

For a two-optional-param tool with no output schema, the definition covers the essential behavior: blocking duration, early return, per-chat scoping, and the timed_out signal. It leaves only minor gaps around the returned message shape and side effects.

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?

The description adds meaning beyond the schema: 'optionally in one chat' confirms the chat filter is optional and scopes it to 'wake for' semantics rather than mere filtering, and 'up to 60 s' reinforces the timeout ceiling. Most of this is close to what the 100%-covered schema already states, so the added value is modest.

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: 'Long-poll' for messages, with an explicit scope (up to 60 s, optionally per chat). The 'wait/long-poll' framing implicitly separates it from the fetch-oriented siblings like get_messages or get_new_messages, though it never names them.

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?

Usage is implied by the long-poll semantics: use this to block until a message arrives. However, there is no explicit when-not guidance, e.g. 'use get_new_messages for an immediate non-blocking check' or advice on when waiting is preferable to polling.

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