Skip to main content
Glama

wait_for_claim_failed

Read-onlyIdempotent

Block until a claimed run is stopped for exceeding its budget, then return the ClaimFailed event with holder and budget axis, or null when the timeout lapses.

Instructions

Block until a claimed run is stopped for going over its budget (claim_failed) and return the ClaimFailed event (member_id is the stopped holder, reason the budget axis: tokens, usd, turns or wall), or null when the timeout lapses. A report_usage past a limit releases the claim, dead-letters the run and emits it; a reclaim whose worked time put the thread over budget emits it too. Use wait_for_claim_expired for a holder that died or stopped renewing instead, and wait_for_event to wait on several kinds. Scoped to channel_id when given, else any thread you may read in the workspace; since_log_id replays a stop recorded in the gap before this call subscribes. To put a deadline on a thread instead, use set_wait. Requires workspace:read.

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

Input Schema

NameRequiredDescriptionDefault
channel_idNoUUID of a channel; only budget stops of its tasks count. Omitted, any thread you may read in the workspace.
timeout_msNoWait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null.
since_log_idNoYour high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv479.0.2
    • changedInput schema / properties / channel_id / description
      Previous value: -"optional: scope to one channel's tasks"New value: +"UUID of a channel; only budget stops of its tasks count. Omitted, any thread you may read in the workspace."
    • changedInput schema / properties / since_log_id / description
      Previous value: -"lookback anchor: replay the log for a matching event with log_id greater than this before parking live"New value: +"Your high-water log_id. The log is replayed for a matching event with a log_id greater than this before the wait goes live, so an event in the gap between two calls is caught. Omitted, only events after the call count."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"long-poll window in milliseconds"New value: +"Wait window in milliseconds, from 1 to 300000 (default 30000). When it lapses the tool returns null."
  2. First observedv479.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the triggering mechanics (a report_usage past a limit releases the claim, dead-letters the run and emits the event; an over-budget reclaim emits it too), the required workspace:read scope, the null-on-timeout result, and the gap-replay behavior of since_log_id. These are exactly the operational details annotations cannot carry.

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 a dense single paragraph with the core behavior front-loaded and no filler, but the middle sentences on report_usage/reclaim mechanics and the channel_id/since_log_id scoping pack a lot together, making it heavier to scan than a 5 would require.

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?

With no output schema, the description fully carries the return contract — event identity, the member_id and reason fields with their value axes, and null on timeout. Combined with the auth requirement and timeout bound, an agent has everything needed to call and interpret it.

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 already 100%, yet the description still adds meaning: channel_id is described as scoping to budget stops of its tasks versus any readable thread, and since_log_id is framed as a high-water mark that replays a stop recorded in the gap before subscription. Timeout semantics (null when it lapses) are restated rather than extended, so it stops short of a full 5.

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 first clause names a precise verb and condition — block until a claimed run is stopped for budget overrun (claim_failed) — and states exactly what is returned: the ClaimFailed event with member_id and reason (tokens, usd, turns, wall), or null on timeout. It is immediately distinguishable from wait_for_claim_expired, which is named explicitly.

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?

It gives explicit alternatives with selection conditions: wait_for_claim_expired for a holder that died or stopped renewing, wait_for_event to wait on several kinds, and set_wait to put a deadline on a thread instead. Both the when and the when-not are covered.

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