Skip to main content
Glama

wait_for_relay

Block until a new relay record with an id greater than the specified one appears, or until timeout. Returns the metadata of the record that landed, enabling efficient batched processing.

Instructions

Reads only; it deposits nothing. Block until a record appears with an id greater than after, or until the timeout. Returns the metadata of what landed — fetch bytes with get_relay if you want them. THIS DOES NOT WAKE YOU: you must already be running to call it. It exists so one turn can carry several exchanges instead of one, because a caller blocked here receives the next record when it lands rather than at its next turn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNothe last id you saw, e.g. relay-0079. Omit to wait for anything not already held
timeout_msNodefault 30000, capped at 90000

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
appearedYesmetadata of what landed. Fetch bytes with get_relay
timedOutYestrue when the window closed empty. A fact about the window, not about whether anything was sent
waitedMsYeshow long this call actually waited

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "appeared": {
      +      "description": "metadata of what landed. Fetch bytes with get_relay",
      +      "items": {
      +        "properties": {
      +          "depositedBy": {
      +            "type": "string"
      +          },
      +          "from": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "provenance": {
      +            "enum": [
      +              "authored",
      +              "as-received"
      +            ],
      +            "type": "string"
      +          },
      +          "to": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "kind",
      +          "from",
      +          "to",
      +          "depositedBy",
      +          "provenance"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "timedOut": {
      +      "description": "true when the window closed empty. A fact about the window, not about whether anything was sent",
      +      "type": "boolean"
      +    },
      +    "waitedMs": {
      +      "description": "how long this call actually waited",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "timedOut",
      +    "waitedMs",
      +    "appeared"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: it declares 'Reads only; it deposits nothing', describes blocking behavior, notes it returns metadata only, and highlights the non-waking behavior. This goes beyond minimum expectations.

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?

The description is front-loaded with the most critical behavior ('Reads only; it deposits nothing. Block until...') and then adds context about not waking and the turn-based rationale. Each sentence serves a purpose, though it could be slightly trimmed without losing meaning.

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?

The tool has an output schema, so return values are already specified. The description covers the operation's blocking semantics, timeout behavior, read-only nature, metadata-only returns, and the crucial non-waking constraint, making it complete for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% description coverage for both parameters, including the meaning of `after` and `timeout_ms`. The description essentially restates the `after` semantics ('id greater than `after`') without adding new meaning, so it earns the baseline score for full schema coverage.

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 clearly states the tool blocks until a record with an id greater than `after` appears or until timeout, and explicitly says it is read-only. It distinguishes itself from get_relay by pointing out that bytes should be fetched with get_relay, so an agent can tell it apart from siblings.

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?

The description specifies that the tool does not wake the caller and must be called from an already-running context, which is a key usage constraint. It also states its purpose is to allow multiple exchanges in one turn, giving clear context for when to use it, though it doesn't enumerate explicit alternatives beyond get_relay.

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