Skip to main content
Glama

wait_for_event

Block until the next matching event arrives on a bucket, or until the timeout. Use this to turn "go click Send test webhook in Stripe" into a synchronous step: call it, tell the human to trigger the event, and it returns as soon as one arrives. Filters (provider, type) mean unrelated traffic does not wake it. Returns the event, or nothing if it times out.

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": {
      "bucket_id": "<bucket_id>"
    },
    "name": "wait_for_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoOnly resolve on this event type.
tokenNoOnly when connected without an API key: the api_token that create_bucket returned for this bucket.
timeoutNoSeconds to wait (1–55, default 30).
providerNoOnly resolve on an event from this provider.
bucket_idYesThe endpoint id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / token
      Added value: +{
      +  "description": "Only when connected without an API key: the api_token that create_bucket returned for this bucket.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/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 well: it discloses blocking semantics, that the call resolves on a matching event or the timeout, that filtering suppresses unrelated wakeups, and that timeout returns nothing. It leaves unclear whether the event is consumed or still visible to list_events, which matters for a waiter tool.

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?

It is front-loaded with the core blocking behavior, followed by the motivating use case and filter semantics. The Stripe example is somewhat verbose but earns its place by making the blocking pattern concrete.

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 5-parameter tool with one required parameter and no output schema, the definition covers the return value ('the event, or nothing'), filtering behavior, and timeout outcome. The optional token credential path is only in the schema, but that is acceptable given full schema coverage.

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 baseline is 3, but the description adds real meaning beyond the schema: filters (provider, type) are described functionally as preventing unrelated traffic from waking the call, and the timeout's 'returns nothing' outcome is stated. The token parameter's auth-only role is left to the schema.

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?

The description gives a specific verb and resource: 'Block until the next matching event arrives on a bucket, or until the timeout.' The blocking nature implicitly sets it apart from siblings like get_event, latest_event, and list_events, which return immediately, but it does not name any alternatives explicitly.

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 a concrete when-to-use scenario (turn a 'click Send test webhook in Stripe' instruction into a synchronous step) and explains that provider and type filters keep unrelated traffic from waking it. It does not state when not to use it, such as using latest_event when the event may have already arrived.

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.