Skip to main content
Glama

wait_for_relay

Reads only; it deposits nothing. Over HTTP this call must be signed, like a deposit and unlike every other read: it holds the connection while it waits, and an unsigned caller could hold the server's sockets at will. Over stdio no credential exists or is needed. 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 changed
    • 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 observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it does so admirably. It discloses that the tool is read-only, that it holds the connection while waiting, that signing is required over HTTP to prevent socket exhaustion, that stdio needs no credential, that it does not wake the caller, and what it returns. This is exactly the behavioral context an agent needs.

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?

The description is detailed but every sentence earns its place: safety, authentication, blocking behavior, return semantics, routing to `get_relay`, and the rationale for existing. The key scoping phrase 'Reads only; it deposits nothing' is front-loaded, and no irrelevant filler is present.

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 tool with no annotations and two simple parameters, this description is complete. It covers what the tool does, the blocking and timeout behavior, auth differences across transports, what is returned, and how to retrieve the actual bytes. The presence of an output schema additionally reduces the need for the description to explain return structure.

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 100%, so the schema already documents both parameters. The description adds meaningful semantics beyond the schema by stating that blocking occurs until a record with an id greater than `after` appears or the timeout is reached, clarifying the relationship between `after` and the returned records. It does not need to repeat the default/cap details already in the schema.

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 identifies a precise behavior: it waits/block until a record with id greater than `after` appears or a timeout elapses, then returns metadata. It distinguishes itself from `get_relay` by explicitly directing callers there for fetching bytes, and from siblings through the 'reads only; deposits nothing' framing.

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 tells the agent when this tool is useful ('so one turn can carry several exchanges instead of one') and clearly contrasts it with `get_relay` for fetching bytes. It also gives crucial usage context: it must be called while already running, and over HTTP it must be signed, unlike other reads. It does not enumerate every sibling alternative, but the provided guidance is sufficient.

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.

Resources