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
summary_diffNo
still_runningNo
concurrency_noticeNo
previous_preview_staleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / commit_hash / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / error / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / log_tail / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / summary_diff
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark it read-only, and the description adds behavioral context beyond annotations: terminal-state handling, default/max timeout, the instruction not to raise the timeout to keep looping, and post-result requirements like not sharing a previous viewer_url and showing concurrency_notice. No contradiction with 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?

The description is front-loaded with the core polling behavior, then gives one-shot usage, then conditional output handling. Every sentence carries operational value, and there is no filler.

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?

Given the output schema exists and the tool has complex follow-up behavior, the description covers all agent-facing decisions: when to call, timeout limits, how to interpret still_running, and when to offer notify_run_email. Nothing essential for correct invocation is missing.

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?

Only timeout_sec has a schema description, giving 25% coverage. The description adds useful context for run_id and timeout_sec, but job_id and interval_sec remain undocumented in both the schema and the description, so the low parameter coverage is only partially compensated.

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 states a specific verb and resource ('Poll a run until completed, failed, cancelled, or the timeout') and ties it to run IDs from create_design/update_design. This makes the tool's purpose clear and distinguishable from lighter-status 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 gives explicit call timing ('at most ONCE after create_design or update_design'), a when-not rule ('do not call this tool again unless the user explicitly asks'), and an alternative path via notify_run_email under a clear condition. This fully satisfies the when/when-not/alternatives criterion.

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