Skip to main content
Glama

wait_for_result

Block until a dispatched task reaches a terminal state or times out, polling every 2 seconds so callers can obtain settled, failed, refunded, or cancelled results.

Instructions

Block until a task reaches a terminal state (settled / failed / refunded / cancelled) or the timeout expires. Polls every 2 seconds.

Input Schema

NameRequiredDescriptionDefault
task_idYesThe intent_id returned by dispatch_task
timeout_sNoMax seconds to wait

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It usefully discloses the 2-second polling interval and the terminal state set, but says nothing about what happens on timeout expiry (error vs partial result), whether the call blocks a shared connection, or what it returns.

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?

Two short sentences, front-loaded with the blocking semantics and the termination conditions. Nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should explain what the caller receives: the final task object, an error on timeout, or the current state. That return contract is absent, which is a meaningful gap for a wait-style tool.

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?

Schema coverage is 100%, so both parameters are fully documented, including the default timeout of 300s and the intent_id provenance. The description adds no parameter detail beyond that, so baseline 3 applies.

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?

States a specific verb+resource ('Block until a task reaches a terminal state') and enumerates the terminal states (settled/failed/refunded/cancelled). The word 'Block' implicitly separates it from check_task_status, but no sibling is named, so differentiation is left to inference.

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

Usage Guidelines3/5

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

Usage is implied: use this when you want to wait rather than poll. There is no explicit guidance on when to prefer check_task_status (e.g. for long-running tasks or when you need intermediate progress) or on prerequisites such as having an intent_id from dispatch_task.

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