Skip to main content
Glama

Wait for run

wait_for_run
Read-only

Poll a run until completed, failed, cancelled, or the timeout (default 45 seconds, max 90). Call this at most ONCE after create_design or update_design, using that run's run_id. If still_running, do not share a previous viewer_url. If concurrency_notice is present, show it. If the result includes still_running: true, do not call this tool again unless the user explicitly asks to keep waiting — show job_id and the new run_id. Offer notify_run_email only if they have not already asked to be emailed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
run_idYes
timeout_secNoSeconds to poll before returning still_running (default 45, capped at 90). Do not raise this to keep looping.
interval_secNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
job_idNo
run_idYes
statusYes
log_tailNo
next_stepNo
charge_usdNo
created_atNo
viewer_urlNo
commit_hashNo
completed_atNo
notify_emailNo
still_runningNo
concurrency_noticeNo
previous_preview_staleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnlyHint/destructiveHint flags, the description discloses the timeout default/cap, the at-most-once contract, the instruction not to reuse a previous viewer_url while still running, and how to surface concurrency_notice. It also defines follow-up behavior (show job_id and new run_id, only offer email if not already asked), which an agent could not infer from annotations.

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 operational guidance; the main purpose and timeout are front-loaded before behavioral rules. There is no filler or repetition of schema/annotations.

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 sequencing, recurrence limits, timeout behavior, viewer_url handling, concurrency_notice, and email-notification policy, so an agent can invoke the tool correctly. It slightly under-specifies the interval_sec parameter, but output schema and annotations cover the return/read-only side, making this a near-complete definition.

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 prose adds real meaning for run_id ('that run's run_id' from create/update) and timeout_sec (default 45, max 90, do not raise to loop). However, job_id's role is only implied and interval_sec is never described, and the schema itself covers only timeout_sec (25%), so the compensation is partial.

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 opening sentence defines a specific action ('Poll a run'), the target resource, and the exact terminal outcomes (completed, failed, cancelled, or timeout). It also names the preceding tools (create_design/update_design), which separates this polling tool from status-reading siblings like check_run.

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 explicitly says to call at most once after create_design or update_design and to pass that run's run_id. It gives a when-not rule: if still_running is true, do not call again unless the user explicitly asks, and it points to notify_run_email as the conditional alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources