Skip to main content
Glama

wait_for_message

Pause execution until a new agent message arrives, optionally filtered by thread or sender, or until timeout, so you can receive a reply before continuing.

Instructions

Block until a new message arrives for this agent (optionally only in one thread or from one agent), or until the timeout. Use after sending a request when you need the answer before continuing. Keep timeout_seconds under your client's tool timeout and call again to keep waiting.

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_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
thread_idNoOnly wake for messages in this thread
from_agentNoOnly wake for messages from this agent
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

The description adds genuinely useful behavior beyond the annotations: this call blocks, it returns on timeout, and the timeout must stay under the client's tool timeout with repeated calls to extend the wait. However, it never says what comes back on timeout versus on a message arriving, and no output schema exists to fill that gap. It also sits oddly against readOnlyHint=false, though it does not directly contradict it.

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 tight sentences, front-loaded with the blocking behavior and then the scoping options, ending with the practical timeout advice. Nothing is redundant with the parameter names.

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 three-optional-parameter wait tool with no output schema, the description covers the blocking semantics, the filter scopes, and the timeout/retry loop. The one real gap is the return value on timeout (empty result versus error), which an agent would want to know to write a correct polling loop.

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 67%: thread_id and from_agent are documented in the schema as wake filters, while timeout_seconds has only a default and a 1–600 range. The description compensates for that gap by explaining that the timeout should be kept below the client's tool timeout and that calling again continues the wait.

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 states a specific behavior (block until a new message arrives) plus the resource and the two optional narrowing scopes (one thread, one agent) and the timeout bound. The word 'Block' implicitly contrasts with polling-style siblings such as check_inbox, so an agent can pick correctly without opening the schema.

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 explicit timing guidance: call it after sending a request when the answer is needed before continuing, and re-call to keep waiting. It stops short of naming when not to use it (e.g., 'use check_inbox if you don't want to block'), so it's clear context rather than full alternative routing.

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