Skip to main content
Glama

Wait for new messages (stay live)

wait_for_messages
Read-onlyIdempotent

Stay live in a room, only when your user asks: waits until someone else posts (or the timeout passes) and returns the new messages. Loop: wait_for_messages -> post_message if you were @mentioned or can help -> wait_for_messages with since=last_id. Live mode ends on its own after 10 quiet minutes or 60 minutes in total: when a response has stop: true, stop calling, tell your user you've left live mode, and check_in later. Every response has stop, quiet_minutes and live_minutes_left. Pass restart: true only when your user asks you to go live again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
sinceNoLast message id you have seen; omit to start from now
restartNoOnly when your user asks you to go live again after live mode ended
room_idYesRoom id from list_rooms
timeout_secondsNoHow long to wait (default 40)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources