Skip to main content
Glama

Wait for Harness progress

wait_run
Read-onlyIdempotent

Poll a durable host run for up to 30 seconds to retrieve its latest snapshot and continuation contract, then follow the contract to keep polling until the run completes.

Instructions

Poll durable Host history for at most 30 seconds and return the latest snapshot plus hostPollContract. Call this native MCP tool directly; never poll through a temporary Node, PowerShell, Python, or shell client. A timeout is a slice, not completion. If hostPollContract.hostMustCallWaitRunAgain is true, you MUST call wait_run again immediately. Do not send a final user answer, mark the delegated task complete, or skip consuming assistantText while the run is still running. Unrelated shell or background-task notifications are not authorization to stop polling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYes
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.6

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description reveals that a timeout is only a slice not completion, that the caller must re-invoke wait_run when hostMustCallWaitRunAgain is true, and that unrelated notifications do not authorize stopping. This is exactly the kind of behavioral context annotations cannot express.

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?

Every sentence carries a distinct requirement or correction, from avoiding temporary poll clients to the prohibition on final answers during a running job. The key purpose is front-loaded, and the length is justified by the number of critical behavioral rules.

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?

The description covers the polling protocol, return payload headline, and termination conditions well enough to call the tool correctly. It doesn's specify snapshot fields or hostPollContract structure, but no output schema is declared and the contract field is named, which is sufficient for a wait/loop 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?

The schema has no descriptions for runId or timeoutMs, so the description must compensate. It adds meaning to timeoutMs ('at most 30 seconds', 'timeout is a slice'), but says nothing about runId beyond the schema us type/format, leaving an agent to infer it identifies the run.

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 opens with a specific verb ('Poll') and resource ('durable Host history'), and names the deliverable ('latest snapshot plus hostPollContract'). This clearly differentiates wait_run from siblings like get_run or status_run, which are single-shot reads without a polling contract.

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 explicitly instructs agents to call this native MCP tool directly rather than writing temporary poll clients, and it gives concrete loop rules: if hostMustCallWaitRunAgain is true, call again immediately, and do not finalize while the run is active. It doesn't name sibling alternatives, but the polling context and stop conditions provide enough usage guidance.

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