Skip to main content
Glama

set_wait

Destructive

Set or update a thread's non-blocking wait deadline; on timeout, notify the owner or park the thread. Cancel it when the awaited event occurs.

Instructions

Set (upsert) a wait timer on a thread: it is waiting until wait_until, and on timeout the sweeper escalates via on_timeout but decides nothing (notify reaches the owner; park also marks the thread unclaimable). Default policy is notify. Cancel it when the awaited thing happens. Requires thread:transition. This returns at once and does not block; to block until something happens, use a wait_for_* tool such as wait_for_result or wait_for_ready.

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": {
      "thread_id": "<thread_id>",
      "wait_until": "<wait_until>"
    },
    "name": "set_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNowhy the thread is waiting
thread_idYes
on_timeoutNoescalation policy on timeoutnotify
wait_untilYesdeadline (RFC 3339)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv479.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Well beyond the annotations, it discloses the permission gate, the default timeout policy, the concrete effect of each escalation mode (notify reaches the owner; park marks the thread unclaimable), and that the call is non-blocking. The one friction point is "upsert" sitting against idempotentHint=false, since repeating an identical set would appear to produce the same state; the description does not reconcile this. It also does not say what happens to a pre-existing timer in detail, though "upsert" implies overwrite, which is consistent with destructiveHint=true.

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 core action and lifetime semantics, with alternatives pushed to the end. The single paragraph uses parentheticals and semicolons heavily, which makes it dense, but every clause carries information that would otherwise require guessing.

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 4-parameter mutation with no output schema, the description covers the key gaps: permission requirement, blocking behavior, timeout default, and escalation effects. It could go further on whether wait_until accepts past timestamps or what a returned identifier looks like, but nothing essential to correct 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 75%, so the baseline is 3, and the description earns an extra point by explaining the enum values' consequences (notify reaches the owner, park makes the thread unclaimable) and the default policy, which the schema only labels as "escalation policy on timeout." It adds no meaning for thread_id or reason, but those are conventional enough that the omission is minor.

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?

"Set (upsert) a wait timer on a thread" gives a specific verb plus resource, then immediately explains the semantics of the timer (waiting until wait_until, sweeper escalation on timeout). It also explicitly distinguishes itself from the wait_for_* family, so an agent can pick correctly without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description says when to cancel ("Cancel it when the awaited thing happens"), names the required permission (thread:transition), and routes blocking use cases to a named alternative ("use a wait_for_* tool such as wait_for_result or wait_for_ready"). Use, mutation, and exclusion conditions are all present.

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

Deploy Server

Other Tools