Skip to main content
Glama

build_wait

Read-onlyIdempotent

Waits server-side for a run to finish and returns its record; fails if timeout expires or, with strict materials, if material-guard warnings occur.

Instructions

Block (server-side, no client sleep loop) until the run finishes, then return its record. Raises if it is still running after timeout_sec. With strict_materials, a run whose log has material-guard warnings is an error even though its status is 'succeeded'.

Input Schema

NameRequiredDescriptionDefault
run_idYes
timeout_secNoGive up after this many seconds (exit 7)
strict_materialsNoWhen true, fail the call if the material guard flagged warnings

Output Schema

NameRequiredDescriptionDefault
idYes
kindNobuild
lockNoThe host lock this run holds (owner build:<id>), when it is still its own
notesNo
ownerYesHost-lock owner holding this run's lease, 'build:<id>'
handleNoProcess handle (pid) when known
statusYes
commandYes
host_idYes
summaryNoParsed counts from the log summary line
web_urlNoAbsolute URL of this run's page in the web UI (Activity page)
log_pathNo
warningsNoMaterial-guard findings; None when the log was clean or unscanned
artifactsNo
exit_codeNo
created_atYes
updated_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered; the description adds genuinely new behavior — server-side blocking, a raise on timeout, and the subtle rule that strict_materials turns material-guard warnings into an error even when status is 'succeeded'. That last point is exactly the kind of non-obvious semantics an agent cannot infer.

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?

Three sentences, each doing distinct work: what it does, what failure looks like, and the strict-mode edge case. Blocking behavior is front-loaded, and there is no filler.

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?

An output schema exists, so return-value detail is unnecessary, and the description still notes that the run record is returned. For a long-blocking tool with error-on-timeout behavior, the essentials are covered; only an explicit pointer to build_status as the non-blocking alternative 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 67%, with timeout_sec and strict_materials already documented in the schema. The description adds meaning for strict_materials beyond the schema's phrasing by explaining the failure condition relative to the run's success status, and the timeout raise condition is reinforced. run_id is self-evident.

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 and resource — block until the run finishes, then return its record — and the parenthetical '(server-side, no client sleep loop)' distinguishes it from the polling pattern an agent would otherwise use. It never names the sibling it replaces (build_status), so it falls short of 5.

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?

Clear context for when to call: you want to wait for completion rather than poll. Timeout behavior and the strict_materials escalation are spelled out. However, it does not explicitly route an agent to build_status for non-blocking checks or to build_cancel when waiting is undesirable.

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