Skip to main content
Glama

wait

Blocks until an async job completes or the timeout expires; on timeout, returns without killing the worker.

Instructions

Wait for a job to finish with a timeout. Timeout returns without killing the worker.

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": {
      "job_id": "<job_id>"
    },
    "name": "wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes
verboseNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuinely important behavior: on timeout the call returns without killing the worker, so the job keeps running. It says nothing about whether the call blocks until completion, what is returned on success versus timeout, or any permissions or rate limits, leaving meaningful gaps for a long-running operation.

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?

Two short sentences, front-loaded with the action and immediately followed by the most consequential behavior. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given three undocumented parameters, no output schema, and no annotations, the definition is under-specified for a blocking job-control tool: an agent cannot tell what the call returns on success or timeout, how long the default wait is, or what verbose does.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for all three parameters, so the description must compensate, but it only gestures at 'timeout' for timeout_ms. It does not explain job_id, the units/limits of timeout_ms, or what verbose changes in the response.

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?

The description names a specific verb and object ('wait for a job to finish') plus a scoping constraint ('with a timeout'), which is enough for an agent to distinguish it from siblings like cancel or start. It stops short of naming an alternative explicitly, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the agent can infer this belongs after launching a job, but there is no statement of when to prefer it over tail/get or of any prerequisite such as having a valid job_id. No exclusions or alternatives are given.

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