Skip to main content
Glama

Wait for a run

wait_run
Read-only

Wait up to seconds (default 25, at most 55) for a run to finish, then return it: one call instead of polling get_run every few seconds. Call it again while final is false. The answer comes back the moment the run is final (verdict, checks and evidence in), or when the time is up with final false — then call wait_run again. Runs take 2 to 20 minutes, so expect several calls for a long run; each costs nothing while it waits. Reference: https://testsy.dev/docs/mcp/

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "runId": "<runId>"
    },
    "name": "wait_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYesRun id (j_…)
secondsNoHow long to wait at most, 1–55 (default 25)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly and non-destructive, but the description adds substantial behavior beyond them: it blocks for a bounded time, returns early the moment the run is final, returns final=false on timeout, and costs nothing while waiting. It also discloses the payload contents (verdict, checks, evidence), which is critical since there is no output schema.

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?

Dense but every sentence carries load: timing bounds, the anti-polling rationale, the retry loop, the return contract, and the expected call count. The only minor redundancy is restating the retry instruction twice, which reads as deliberate emphasis for the loop rather than padding.

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?

For a blocking-wait tool with no output schema, the description supplies exactly what is missing structurally: what is returned, what the final flag means, how to continue, and how long runs actually take. An agent has everything needed to drive the wait loop correctly.

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 100%, so both parameters are already documented and the baseline would be 3. The description still adds value by explaining the default and cap in context of the retry loop and by noting that waiting time is free, which informs how to size the `seconds` argument relative to the 2–20 minute run duration.

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?

States a specific verb and resource ('wait ... for a run to finish, then return it') and explicitly contrasts with the polling alternative get_run, which is named directly. An agent can distinguish this from get_run without opening either schema.

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?

Gives explicit when-to-use ('one call instead of polling get_run every few seconds'), an explicit loop rule ('call it again while final is false'), and expectation setting ('expect several calls for a long run'). Nothing about invocation strategy is left to inference.

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.