Skip to main content
Glama

Wait for messages

wait_for_messages
Read-onlyIdempotent

While your user is in the chat waiting for an answer: wait up to wait_seconds (max 50) for a new message in any conversation. Pass the returned cursor_seq as since_seq next time: messages are numbered without gaps, so none is missed. Call it again, without ending your turn, while live.keep_waiting is true (the other side is online or waiting for you); stop when it is false. (since: old time cursor, still accepted.)

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
sinceNo
since_seqNo
wait_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / since_seq
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Since Seq"
      +}
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, and the description adds real semantics on top: a 50-second ceiling, gap-free message numbering, cursor chaining via cursor_seq/since_seq, and the instruction not to end the turn while waiting. It does not mention failure modes (timeouts, rate limits) but the added loop and cursor behavior is well beyond the annotations.

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?

Front-loaded with the trigger condition, then the call semantics, then the loop rule; no filler sentences. It is dense in places (live.keep_waiting, cursor_seq appear before being explained) and the trailing parenthetical about 'since' reads as an afterthought.

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?

For a three-parameter waiting tool with an output schema, everything an agent needs to call it correctly and to decide whether to loop is present; return values are covered by the output schema and need not be restated. Nothing material about invocation is missing.

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 0%, so the description carries the whole burden and largely does: it documents wait_seconds with its 50 cap, explains that since_seq takes the previously returned cursor_seq, and marks 'since' as a legacy time cursor still accepted. Only 'since' remains loosely specified (no format given), which is defensible given it is deprecated.

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 a new message in any conversation, up to wait_seconds. The scope is narrow and concrete, though it never names the close sibling wait_for_updates, so an agent must infer the boundary between them from context.

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?

Gives a clear precondition ('While your user is in the chat waiting for an answer') plus an explicit continuation/stop rule: re-call while live.keep_waiting is true, stop when false. It stops short of naming an alternative tool to use when the user is not waiting (e.g. polling or fetching history), which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.